Verified Commit 53e3b94f authored by deniss.marinuks's avatar deniss.marinuks
Browse files

updated validator script

parent e2d39f6d
......@@ -26,21 +26,22 @@ for error in errors:
print(error)
print('------')
# check lng and lat
lng = json_file['location']['geometry']['coordinates'][0]
lat = json_file['location']['geometry']['coordinates'][1]
if not hasError:
# check lng and lat
lng = json_file['location']['geometry']['coordinates'][0]
lat = json_file['location']['geometry']['coordinates'][1]
if lng != json_file['location']['longitude'] and lat != json_file['location']['longitude']:
print("Error: Longitude does not match any values in the coordinates array")
sys.exit(1)
if lng != json_file['location']['longitude'] and lat != json_file['location']['longitude']:
print("Error: Longitude does not match any values in the coordinates array")
sys.exit(1)
if lng != json_file['location']['latitude'] and lat != json_file['location']['latitude']:
print("Error: Latitude does not match any values in the coordinates array")
sys.exit(1)
if lng != json_file['location']['latitude'] and lat != json_file['location']['latitude']:
print("Error: Latitude does not match any values in the coordinates array")
sys.exit(1)
if lng != json_file['location']['longitude']:
print("Error: Longitude has to be the first parameter in the coordinates array")
sys.exit(1)
if lng != json_file['location']['longitude']:
print("Error: Longitude has to be the first parameter in the coordinates array")
sys.exit(1)
if not hasError:
print("Validation successful.")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment