aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bot/bot.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/bot.py b/bot/bot.py
index c436f21..37fefac 100644
--- a/bot/bot.py
+++ b/bot/bot.py
@@ -149,7 +149,7 @@ async def process(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
149 exif = im.getexif() 149 exif = im.getexif()
150 150
151 camera_model = "" 151 camera_model = ""
152 shot_datetime = "" 152 shot_datetime = None
153 if exif: 153 if exif:
154 for key, val in exif.items(): 154 for key, val in exif.items():
155 if key in ExifTags.TAGS: 155 if key in ExifTags.TAGS:
@@ -175,7 +175,7 @@ async def process(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
175 caption=caption, 175 caption=caption,
176 alt="", 176 alt="",
177 model=camera_model, 177 model=camera_model,
178 createdAt=shot_datetime if len(shot_datetime) > 0 else datetime.now(), 178 createdAt=shot_datetime if shot_datetime else datetime.now(),
179 uploadedAt=datetime.now()) 179 uploadedAt=datetime.now())
180 180
181 output.seek(0) 181 output.seek(0)
Powered by cgit v1.2.3 (git 2.41.0)