fix: check only for required notification arguments
This commit is contained in:
parent
ce1cc12740
commit
8a0ad53753
2 changed files with 4 additions and 3 deletions
|
@ -13,8 +13,9 @@ class TestNotification(UptimeKumaTestCase):
|
|||
"name": "notification 1",
|
||||
"isDefault": True,
|
||||
"applyExisting": True,
|
||||
"type": NotificationType.PUSHBYTECHULUS,
|
||||
"pushAPIKey": "123456789"
|
||||
"type": NotificationType.TELEGRAM,
|
||||
"telegramChatID": "123456789",
|
||||
"telegramBotToken": "987654321"
|
||||
}
|
||||
|
||||
# test notification
|
||||
|
|
|
@ -305,7 +305,7 @@ def _check_arguments_notification(kwargs) -> None:
|
|||
_check_missing_arguments(required_args, kwargs)
|
||||
|
||||
type_ = kwargs["type"]
|
||||
required_args = notification_provider_options[type_]
|
||||
required_args = [i for i, j in notification_provider_options[type_].items() if j["required"]]
|
||||
_check_missing_arguments(required_args, kwargs)
|
||||
_check_argument_conditions(notification_provider_conditions, kwargs)
|
||||
|
||||
|
|
Loading…
Reference in a new issue