From 6ccc0463863f4287cbf9fd06b52750b0ea808493 Mon Sep 17 00:00:00 2001 From: Johannes Wilm Date: Tue, 9 Aug 2022 21:25:00 +0200 Subject: [PATCH] fix error type --- avatar/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avatar/models.py b/avatar/models.py index c7f4a8a..12b3b72 100644 --- a/avatar/models.py +++ b/avatar/models.py @@ -138,7 +138,7 @@ class Avatar(models.Model): try: orientation = image._getexif()[0x0112] ops = EXIF_ORIENTATION_STEPS[orientation] - except AttributeError: + except TypeError: ops = [] for method in ops: image = image.transpose(getattr(Image, method))