Skip to content

Commit

Permalink
Fix placeholder apsect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
codingjoe committed May 20, 2022
1 parent f64d9dd commit 46cc0fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pictures/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def placeholder(request, width, ratio, file_type, alt):
except ValueError:
raise Http404()
settings = conf.get_settings()
height = math.floor(width * ratio)
height = math.floor(width / ratio)
if file_type.upper() not in settings.FILE_TYPES:
raise Http404("File type not allowed")
img = utils.placeholder(width, height, alt=alt)
Expand Down

0 comments on commit 46cc0fa

Please sign in to comment.