Skip to content

Commit 7b8826c

Browse files
committed
bghyjkn
1 parent fbf94ce commit 7b8826c

File tree

1 file changed

+2
-2
lines changed
  • src/argus/notificationprofile/media

1 file changed

+2
-2
lines changed

src/argus/notificationprofile/media/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ def validate_settings(cls, data: dict, user: User, exception_class=ValidationErr
9797

9898
form = cls.clean(form)
9999

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

103103
return form.cleaned_data
104104

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

0 commit comments

Comments
 (0)