more robust error checking

pull/24/head
Hartmut Holzgraefe 2018-09-16 11:27:31 +02:00
rodzic 921f845457
commit 4ea1e58e29
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -107,7 +107,7 @@ def job_stati(request):
def jobs(request, job_id):
def jobs(request, job_id=False):
"""API handler for external rendering requests"""
if request.method == 'GET':
@ -189,7 +189,7 @@ def _jobs_post(request):
if 'osmid' in input:
job.administrative_osmid= input['osmid']
elif 'bbox_top' in input:
elif 'bbox_top' in input and 'bbox_bottom' in input and 'bbox_left' in input and 'bbox_right' in input:
job.lat_upper_left = input['bbox_top']
job.lon_upper_left = input['bbox_left']
job.lat_bottom_right = input['bbox_bottom']