Skip to content

Commit

Permalink
models.reference_files:IgnoreAction._validate_mode - fix missing pare…
Browse files Browse the repository at this point in the history
…ntheses around "or" logic
  • Loading branch information
MatteoCampinoti94 committed Oct 22, 2024
1 parent c761bfa commit bf9972c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion acacore/models/reference_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class IgnoreAction(NoDefaultsModel):

@model_validator(mode="after")
def _validate_model(self) -> Self:
if self.template == "text" and self.reason is None or not self.reason.strip():
if self.template == "text" and (self.reason is None or not self.reason.strip()):
raise ValueError("Reason cannot be empty when template is set to text.")
self.reason = (self.reason.strip() or None) if self.reason else None
return self
Expand Down

0 comments on commit bf9972c

Please sign in to comment.