Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Arcuri committed Mar 29, 2024
1 parent 94355c8 commit 90c3869
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orochi/website/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ def dump_saved(sender, instance, created, **kwargs):
@staticmethod
@receiver(pre_save, sender=Result)
def cache_previous_mode(sender, instance, *args, **kwargs):
original_status = None
original_result = None
if instance.id:
original_status = Result.objects.get(pk=instance.id).status
instance.__original_status = original_status
original_result = Result.objects.get(pk=instance.id).result
instance.__original_result = original_result


@staticmethod
Expand All @@ -277,7 +277,7 @@ def result_saved(sender, instance, created, **kwargs):
message = (
f"Plugin {instance.plugin.name} on {instance.dump.name} has been created"
)
elif instance.__original_status != instance.status:
elif instance.__original_result != instance.result:
message = (
f"Plugin {instance.plugin.name} on {instance.dump.name} has been updated"
)
Expand Down

0 comments on commit 90c3869

Please sign in to comment.