Skip to content

Commit

Permalink
fix hook manager
Browse files Browse the repository at this point in the history
  • Loading branch information
jefer94 committed Jun 24, 2024
1 parent c6eff0a commit 780d291
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions breathecode/notify/utils/hook_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def deliver_hook(self, hook, instance, payload_override=None, academy_override=N
except Exception as e:
instance, _ = HookError.objects.get_or_create(message=str(e), event=hook.event)

if instance.hooks.filter(id=instance.id).exists() is False:
instance.hooks.add(instance)
if instance.hooks.filter(id=hook.id).exists() is False:
instance.hooks.add(hook)


HookManager = HookManagerClass()

0 comments on commit 780d291

Please sign in to comment.