mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
ruff: Fix SIM118 Use k not in d instead of k not in d.keys().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 74d6d76046)
This commit is contained in:
committed by
Alex Vandiver
parent
91e5ef39eb
commit
323223db4c
@@ -65,9 +65,9 @@ def validate_external_account_field_data(field_data: ProfileFieldData) -> Profil
|
||||
field_validator("field_data", field_data)
|
||||
|
||||
field_subtype = field_data.get("subtype")
|
||||
if field_subtype not in DEFAULT_EXTERNAL_ACCOUNTS.keys():
|
||||
if field_subtype not in DEFAULT_EXTERNAL_ACCOUNTS:
|
||||
if field_subtype == "custom":
|
||||
if "url_pattern" not in field_data.keys():
|
||||
if "url_pattern" not in field_data:
|
||||
raise ValidationError(_("Custom external account must define URL pattern"))
|
||||
else:
|
||||
raise ValidationError(_("Invalid external account type"))
|
||||
|
||||
Reference in New Issue
Block a user