0

Better manualPOI validator

This commit is contained in:
Andrew Chin
2013-01-02 22:10:57 -05:00
parent 813777a88f
commit a49a05a2ee

View File

@@ -229,8 +229,8 @@ def validatePath(p):
def validateManualPOIs(d):
for poi in d:
if not poi['x'] or not poi['y'] or not poi['z'] or not poi['id']:
raise ValidationException("Not all POIs have x/y/z coordinates or an id.")
if not 'x' in poi or not 'y' in poi or not 'z' in poi or not 'id' in poi:
raise ValidationException("Not all POIs have x/y/z coordinates or an id: %r" % poi)
return d
def make_dictValidator(keyvalidator, valuevalidator):