Skip to content

Commit

Permalink
fixup! Clear MiscConfig cache properly when saving/deleting the object;
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjaclasher committed May 21, 2020
1 parent 7178f46 commit 3712d74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion judge/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def misc_config_cache_delete(key):
@receiver(pre_save, sender=MiscConfig)
def misc_config_pre_save(sender, instance, **kwargs):
try:
old_key = MiscConfig.objects.filter(id=instance.id).values_list('key').get()
old_key = MiscConfig.objects.filter(id=instance.id).values_list('key').get()[0]
except MiscConfig.DoesNotExist:
old_key = None
instance._old_key = old_key
Expand Down

0 comments on commit 3712d74

Please sign in to comment.