summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2025-03-11 17:00:38 +0000
committerPhilip Sargent <philip.sargent@gmail.com>2025-03-11 17:00:38 +0000
commit31c77fd89c831d4e6450d5b29755954e329d5d0f (patch)
tree2e60c848963063eeb937f1e4a968d30e98d21eb4
parent2b010384f1fffa5b32395f201d5ff47c3547bea4 (diff)
downloadtroggle-31c77fd89c831d4e6450d5b29755954e329d5d0f.tar.gz
troggle-31c77fd89c831d4e6450d5b29755954e329d5d0f.tar.bz2
troggle-31c77fd89c831d4e6450d5b29755954e329d5d0f.zip
fix bug if no exif on file
-rw-r--r--core/views/editor_helpers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/views/editor_helpers.py b/core/views/editor_helpers.py
index 7b4a4e1..8028c4f 100644
--- a/core/views/editor_helpers.py
+++ b/core/views/editor_helpers.py
@@ -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