From 8d480e2dfef30252f9ef35c60c66e8876fd464f1 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 8 Apr 2019 17:02:56 +0200 Subject: Fix person merge when the target have an ishtar profile (refs #4477) --- ishtar_common/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 9bcfd4930..a3e0302aa 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -3998,7 +3998,10 @@ def post_save_userprofile(sender, **kwargs): if not kwargs.get('instance'): return instance = kwargs.get('instance') - instance.person.ishtaruser.show_field_number(update=True) + try: + instance.person.ishtaruser.show_field_number(update=True) + except IshtarUser.DoesNotExist: + return post_save.connect(post_save_userprofile, sender=UserProfile) -- cgit v1.2.3