1
How about calling update
, which just updates the fields, and does not call the save
.
def save(self, *args, **kwargs):
Email.objects.filter(content_type__pk=self.content_type.id, object_id=self.object_id, main=True).update(main=False)
self.main = True
super(Email, self).save(*args, **kwargs)
Here is the documentation on update
Source:stackexchange.com