diff options
author | 2021-03-16 09:29:34 +0200 | |
---|---|---|
committer | 2021-03-16 09:29:34 +0200 | |
commit | 535ca293b9448006dce2bf92a202ce6679ece86b (patch) | |
tree | 940df1727148b6a49f84351c78433324d97eb1db /backend/models/form.py | |
parent | Split public fields constant to multiple lines (diff) |
Split if statement to multiple lines to avoid noqa
Diffstat (limited to 'backend/models/form.py')
-rw-r--r-- | backend/models/form.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/backend/models/form.py b/backend/models/form.py index 8780aa7..a6fe888 100644 --- a/backend/models/form.py +++ b/backend/models/form.py @@ -70,7 +70,10 @@ class Form(BaseModel): @root_validator def validate_role(cls, values: dict[str, t.Any]) -> t.Optional[dict[str, t.Any]]: """Validates does Discord role provided when flag provided.""" - if FormFeatures.ASSIGN_ROLE.value in values.get("features", []) and not values.get("discord_role"): # noqa + if ( + FormFeatures.ASSIGN_ROLE.value in values.get("features", []) + and not values.get("discord_role" + ): raise ValueError( "discord_role field is required when ASSIGN_ROLE flag is provided." ) |