Skip to content

Commit

Permalink
Merge pull request #324 from kjsanger/bug/set-zone
Browse files Browse the repository at this point in the history
Set ACL zone for study/sample metadata updates
  • Loading branch information
kjsanger authored Jun 10, 2024
2 parents 2f277ed + 18c3df1 commit 74633ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/npg_irods/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,10 @@ def ensure_secondary_metadata_updated(
f"{TrackedSample.ID} or metadata are present"
)

zone = infer_zone(item)
if sample is None:
secondary_metadata.extend(make_study_metadata(study))
acl.extend(make_study_acl(study))
acl.extend(make_study_acl(study, zone=zone))
elif study is None:
secondary_metadata.extend(make_sample_metadata(sample))
log.warn(
Expand All @@ -404,7 +405,7 @@ def ensure_secondary_metadata_updated(
else:
secondary_metadata.extend(make_study_metadata(study))
secondary_metadata.extend(make_sample_metadata(sample))
acl.extend(make_sample_acl(sample, study))
acl.extend(make_sample_acl(sample, study, zone=zone))

secondary_metadata = sorted(set(secondary_metadata))
acl = sorted(set(acl))
Expand Down

0 comments on commit 74633ee

Please sign in to comment.