Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bghyjkn
Browse files Browse the repository at this point in the history
hmpf committed Dec 4, 2024

Verified

This commit was signed with the committer’s verified signature.
andersy005 Anderson Banihirwe
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
@@ -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

0 comments on commit 7b8826c

Please sign in to comment.