Commit ca44e26
ImportGramplet: look up imported person by handle, not gramps_id
The death-fallback test fetched the imported person with
get_person_from_gramps_id("I00001"), but core's XML importer normalises
gramps_ids to the database's configured width — under the default "I%04d"
the fixture's "I00001" becomes "I0001" — so the literal lookup returned
None and the test failed on every default-config tree (reported by
GaryGriffin on macOS; reproduced here against maintenance/gramps60 and on
Linux).
Exactly one person is imported, so fetch it by handle instead. This removes
the dependency on gramps_id formatting; the death/birth assertions already
resolve their events by handle. The fix wiring under test is unchanged — the
death_ref is correctly set on clean XML, confirming bug 13420 does not
reproduce on conformant input.
Verified: 1 test OK against maintenance/gramps60 (direct unittest and
gramps-testbed addon-unit runner).
Bug #134201 parent 57e38ba commit ca44e26
1 file changed
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
161 | 165 | | |
| 166 | + | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
| |||
0 commit comments