Fix disable signal by checking for empty 'update_fields'.

This commit is contained in:
RecursiveGreen 2018-03-29 22:58:59 -04:00
parent 7d4446c5b2
commit 339a74a453

View file

@ -31,7 +31,10 @@ def cascade_disable(sender, instance, created, update_fields, **kwargs):
If a radio object is disabled, be sure to update other objects that are If a radio object is disabled, be sure to update other objects that are
linked to it. linked to it.
""" """
if 'disabled' in update_fields: if update_fields:
if 'disabled' not in update_fields:
return
if instance.disabled: if instance.disabled:
time = timezone.now() time = timezone.now()
if sender == Artist: if sender == Artist: