Skip to content

Commit 7f6f9a3

Browse files
committed
Fix system person hack to actually work on a fresh import
- Legacy-Id: 3155
1 parent 1bea94e commit 7f6f9a3

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

redesign/importing/import-persons.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
address="",
2828
)
2929

30-
if system_person.id != 0: # work around bug in Django
31-
Person.objects.filter(id=system_person.id).update(id=0)
32-
system_person = Person.objects.get(id=0)
30+
system_person = Person.objects.get(name="(System)")
31+
32+
if system_person.id != 0: # work around bug in Django
33+
Person.objects.filter(id=system_person.id).update(id=0)
34+
system_person = Person.objects.get(id=0)
3335

3436

3537
system_alias = Alias.objects.get_or_create(

0 commit comments

Comments
 (0)