Fixed map generation if no adif file was selected

This commit is contained in:
Thomas Kolb 2023-11-16 23:10:07 +01:00
parent 500255a612
commit d56e509918

2
web.py
View file

@ -12,7 +12,7 @@ def render():
svg_stream = StringIO()
adiffile = request.files.get('adif')
if adiffile and len(adiffile.filename) > 0:
if adiffile and adiffile.filename != "empty":
if adiffile.filename[-4:] not in ['.adi', '.adf'] and adiffile.filename[-5:] not in ['.adif']:
return "File extension not allowed."