Skip to content

Commit

Permalink
Merge pull request #566 from xchem/staging
Browse files Browse the repository at this point in the history
Promote staging metadata fix to production
  • Loading branch information
mwinokan authored Mar 22, 2024
2 parents a2f45f0 + 45f38e0 commit ee5fd26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion viewer/download_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def __init__(self, category):
query = SiteObservationTag.objects.filter(
pk=Subquery(
SiteObvsSiteObservationTag.objects.filter(
site_observation=OuterRef('pk'),
site_observation=OuterRef(OuterRef('pk')),
site_obvs_tag__category=TagCategory.objects.get(
category=category,
),
Expand Down
4 changes: 3 additions & 1 deletion viewer/target_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,9 @@ def _tag_observations(self, tag, prefix, category, so_list):
so_group.save()

try:
so_tag = SiteObservationTag.objects.get(upload_name=tag, target=self.target)
so_tag = SiteObservationTag.objects.get(
upload_name=f"{prefix} - {tag}", target=self.target
)
# Tag already exists
# Apart from the new mol_group and molecules, we shouldn't be
# changing anything.
Expand Down

0 comments on commit ee5fd26

Please sign in to comment.