X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=utils.py;h=a5a7858e359d0f92a7284112f5670be65d2ea876;hb=a6003ee90eec58fac40a2bbcac3fec73f4d780d6;hp=8102773923b44128e36f2075aa50342a98784e41;hpb=66aa03745ce8fe86b2a2d555317ddf94f74e90fa;p=osm%2FRO.git diff --git a/utils.py b/utils.py old mode 100755 new mode 100644 index 81027739..a5a7858e --- a/utils.py +++ b/utils.py @@ -167,9 +167,15 @@ def convert_str2boolean(data, items): def check_valid_uuid(uuid): id_schema = {"type" : "string", "pattern": "^[a-fA-F0-9]{8}(-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}$"} + id_schema2 = {"type" : "string", "pattern": "^[a-fA-F0-9]{32}$"} try: js_v(uuid, id_schema) return True except js_e.ValidationError: - return False + try: + js_v(uuid, id_schema2) + return True + except js_e.ValidationError: + return False + return False