Revert "Fix signals"

This reverts commit 89071bc2e2.
This commit is contained in:
zandercymatics 2023-12-20 09:10:57 -07:00
parent 89071bc2e2
commit 0d57a58f81
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 3 additions and 3 deletions

View file

@ -59,12 +59,12 @@ class Contact(TimeStampedModel):
names = [n for n in [self.first_name, self.middle_name, self.last_name] if n]
return " ".join(names) if names else "Unknown"
def save(self, enable_custom_save=True, *args, **kwargs):
def save(self, *args, **kwargs):
# Call the parent class's save method to perform the actual save
super().save(*args, **kwargs)
# Update the related User object's first_name and last_name
if self.user and enable_custom_save:
if self.user:
self.user.first_name = self.first_name
self.user.last_name = self.last_name
self.user.save()

View file

@ -46,7 +46,7 @@ def handle_profile(sender, instance, **kwargs):
if len(contacts) >= 1 and is_new_user: # a matching contact
contacts[0].user = instance
contacts[0].save(enable_custom_save=False)
contacts[0].save()
if len(contacts) > 1: # multiple matches
logger.warning(