Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
pablosnt committed Apr 7, 2024
1 parent 6f2a5c8 commit c26ae68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/alerts/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_suscribed(self, instance: Any) -> bool:

def validate(self, attrs: Dict[str, Any]) -> Dict[str, Any]:
attrs = super().validate(attrs)
if attrs["mode"] == AlertMode.FILTER and not attrs.get("value"):
if attrs.get("mode") == AlertMode.FILTER and not attrs.get("value"):
raise ValidationError(
"Value is required when the alert mode is 'filter'", code="value"
)
Expand Down

0 comments on commit c26ae68

Please sign in to comment.