Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #470 from tokejepsen/2.x/bugfix/integrate_new_subs…
Browse files Browse the repository at this point in the history
…et_families

Update subset families on integration
  • Loading branch information
mkolar authored Sep 16, 2020
2 parents 1f641e4 + 104027c commit 2ca6db3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pype/plugins/global/publish/integrate_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,14 @@ def get_subset(self, asset, instance):
instance.data.get('subsetGroup')}}
)

# Update families on subset.
families = [instance.data["family"]]
families.extend(instance.data.get("families", []))
io.update_many(
{"type": "subset", "_id": io.ObjectId(subset["_id"])},
{"$set": {"data.families": families}}
)

return subset

def create_version(self, subset, version_number, data=None):
Expand Down

0 comments on commit 2ca6db3

Please sign in to comment.