Skip to content

Commit

Permalink
Merge pull request #188 from sennetconsortium/maxsibilla/issue-186
Browse files Browse the repository at this point in the history
Updating check for if dataset is primary to utilize creation_action
  • Loading branch information
maxsibilla authored Nov 6, 2023
2 parents 72afffa + 5703ff1 commit 7292d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/routes/entity_CRUD/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ def publish_datastage(identifier):

def dataset_is_primary(dataset_uuid):
with Neo4jHelper.get_instance().session() as neo_session:
q = (f"MATCH (ds:Dataset {{uuid: '{dataset_uuid}'}})-[:WAS_GENERATED_BY]->(:Activity)-[:USED]->(s:Sample) RETURN ds.uuid")
q = (f"MATCH (ds:Dataset {{uuid: '{dataset_uuid}'}})-[:WAS_GENERATED_BY]->(a:Activity) WHERE NOT toLower(a.creation_action) ENDS WITH 'process' RETURN ds.uuid")
result = neo_session.run(q).data()
if len(result) == 0:
return False
Expand Down

0 comments on commit 7292d25

Please sign in to comment.