Skip to content

Commit

Permalink
bghyjkn
Browse files Browse the repository at this point in the history
  • Loading branch information
hmpf committed Dec 4, 2024
1 parent fbf94ce commit 7b8826c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/argus/notificationprofile/media/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ def validate_settings(cls, data: dict, user: User, exception_class=ValidationErr

form = cls.clean(form)

if cls.has_duplicate(user.destinations):
if cls.has_duplicate(user.destinations, data["settings"]):
raise exception_class(cls.MEDIA_SETTINGS_KEY, f"{cls.MEDIA_NAME} already exists")

return form.cleaned_data

@classmethod
def clean(cls, form):
def clean(cls, form: forms.Form) -> forms.Form:
"""Can change the cleaned data of a valid form"""
return form

Expand Down

0 comments on commit 7b8826c

Please sign in to comment.