Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where custom project code field wasn't being used on sync from Ayon to SG #67

Merged
merged 3 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,18 @@ Temporary Items
# IDEA
######
.idea/

# Add symlinked files to ignore
client/ayon_shotgrid/version.py
services/leecher/__init__.py
services/leecher/ayon_shotgrid_hub
services/leecher/constants.py
services/leecher/utils.py
services/processor/__init__.py
services/processor/ayon_shotgrid_hub
services/processor/constants.py
services/processor/utils.py
services/transmitter/__init__.py
services/transmitter/ayon_shotgrid_hub
services/transmitter/constants.py
services/transmitter/utils.py
1 change: 0 additions & 1 deletion services/processor/processor/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def start_processing(self):
self.sg_url,
self.sg_script_name,
self.sg_api_key,
project_code_field=self.sg_project_code_field,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well delete it from line 45 since we are not using it any more, and we trust that it comes with the payload...

**payload,
)

Expand Down
5 changes: 4 additions & 1 deletion services/shotgrid_common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,10 @@ def get_sg_entity_as_ay_dict(
query_fields = list(SG_COMMON_ENTITY_FIELDS)
if extra_fields and isinstance(extra_fields, list):
query_fields.extend(extra_fields)


if project_code_field not in query_fields:
query_fields.append(project_code_field)

sg_entity = sg_session.find_one(
sg_type,
filters=[["id", "is", sg_id]],
Expand Down