better handling for alt text

This commit is contained in:
James Ravenscroft 2024-12-02 14:54:38 +00:00
parent a8a704424a
commit 85c1c7901e
1 changed files with 2 additions and 1 deletions

View File

@ -346,8 +346,9 @@ def process_multipart_post():
if "mp-photo-alt[]" in request.form: if "mp-photo-alt[]" in request.form:
try: try:
alt = request.form["mp-photo-alt[]"][i] alt = request.form.getlist('mp-photo-alt[]')[i]
except: except:
print(f"No alt text specified for image {i}")
alt = "" alt = ""
else: else:
alt = "" alt = ""