prevent errors in case that overlay selection is not transmitted

some web clients seem to totally obmit the overlay field instead
of transmitting it empty
pull/60/head
Hartmut Holzgraefe 2020-09-23 09:22:54 +02:00
rodzic e333af4e21
commit 28ba91b10a
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -190,8 +190,11 @@ class MapRenderingJobForm(forms.ModelForm):
layout = cleaned_data.get("layout")
stylesheet = cleaned_data.get("stylesheet")
overlay_array = []
for overlay in cleaned_data.get("overlay"):
overlay_array.append(overlay)
try:
for overlay in cleaned_data.get("overlay"):
overlay_array.append(overlay)
except:
pass
overlay = ",".join(overlay_array)
if layout == '':