Skip to content

Commit

Permalink
check to insure aspect ratio values are ints (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
shhlife authored Nov 21, 2024
1 parent 6ef2067 commit c4642e2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def safety_validator(instance, attribute, value):
def aspect_ratio_validator(instance, attribute, value):
if value:
width, height = value.split(":")
if width < 9 or width > 21 or height < 9 or height > 21:
if int(width) < 9 or int(width) > 21 or int(height) < 9 or int(height) > 21:
raise ValueError("aspect_ratio must be between 9:21 and 21:9")


Expand Down

0 comments on commit c4642e2

Please sign in to comment.