Commit 500ba53c authored by j.hoerdt's avatar j.hoerdt
Browse files

fix quotation of description in pid

parent 9af97fae
......@@ -12,6 +12,7 @@ pid_to_test = "21.11138/c4c0f351-96e2-4e93-bf1f-0fd73e828300"
base_url = "https://hdl.handle.net/"
exit_code = 0
pid_content = json.loads(urllib.request.urlopen(f"{base_url}api/handles/{pid_to_test}").read())
for record in pid_content["values"]:
if record["index"] not in [100,9]:
......@@ -23,4 +24,6 @@ for record in pid_content["values"]:
jsonschema.validate(instance=data, schema=json.loads(type_info["validationSchema"]))
except Exception as e:
print(f"could not validate due to exception: {e}")
exit_code = 1
sys.exit(exit_code);
\ No newline at end of file
......@@ -110,7 +110,7 @@ class Sensor {
add_attribute(body,
"8",
"21.T11148/55f8ebc805e65b5b71dd",
new JsonPrimitive("\""+ rec.get("type.description").asString() +"\"")
new JsonPrimitive(rec.get("type.description").asString())
);
}
add_attribute(body,
......
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