We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 78db144 + 139971f commit 111cb03Copy full SHA for 111cb03
1 file changed
src/routes/metadata/__init__.py
@@ -225,8 +225,10 @@ def get_provenance_metadata(ds_uuid: str):
225
token = get_token()
226
entity = get_entity(entity_id=ds_uuid, token=token)
227
228
- if not equals(entity['entity_type'], Ontology.ops().entities().DATASET):
229
- abort_bad_req(f"Entity with UUID: {ds_uuid} is not of type 'Dataset'")
+ e = Ontology.ops().entities()
+ allowed_entity_types = [e.DATASET, "Publication"]
230
+ if entity['entity_type'] not in allowed_entity_types:
231
+ abort_bad_req(f"Entity with UUID: {ds_uuid} is not of type 'Dataset' or 'Publication'")
232
233
metadata_json_object = entity_json_dumps(entity, token, False)
234
return jsonify(metadata_json_object), 200
0 commit comments