2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-01-21 05:03:46 +00:00

fix bug if no exif on file

This commit is contained in:
2025-03-11 17:00:38 +00:00
parent 2b010384f1
commit 31c77fd89c

View File

@@ -295,7 +295,7 @@ def new_image_form(request, path):
if form.is_valid():
# print(f"new_image_form(): form is valid ")
fyear = form.cleaned_data["year"]
year = form.cleaned_data["year"]
descrip = form.cleaned_data["description"]
editor = form.cleaned_data["who_are_you"]
editor = git_string(editor)
@@ -328,7 +328,7 @@ def new_image_form(request, path):
descrip += f"\n\n{exif_dict['Exif'][36867].decode()} {exif_dict['Exif'][36880].decode()}"
year = exif_dict['Exif'][36867].decode()[:4]
else:
year = fyear # replace with year from photo exif if possible
year = year # replace with year from photo exif if possible
else:
exif = None