We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 247570e commit 91bb829Copy full SHA for 91bb829
1 file changed
src/files/api.py
@@ -90,6 +90,8 @@ def upload( # noqa: C901,PLR0913
90
from images.models import Image as Model # noqa: PLC0415
91
92
data["aspect_ratio"] = Fraction(data["width"], data["height"])
93
+ if data["aspect_ratio"] == "1":
94
+ data["aspect_ratio"] = "1/1"
95
elif data["mimetype"] in settings.ALLOWED_VIDEO_TYPES:
96
from videos.models import Video as Model # noqa: PLC0415
97
elif data["mimetype"] in settings.ALLOWED_AUDIO_TYPES:
0 commit comments