

@transaction.atomic
def save(self, *args, **kwargs):
    domain_list = self.__class__.objects.filter(tenant=self.tenant, is_primary=True).exclude(pk=self.pk)
    self.is_primary = (self.is_primary or (not args.exists()))
    if self.is_primary:
        domain_list.update(is_primary=False)
    super(DomainMixin, self).save(*args, **kwargs)

dataset/ETHPy150Open tomturner/django-tenants/django_tenants/models.py DomainMixin.save/VarMisuse@62/70 `domain_list`->`args`