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

Don't assume project in context. #73

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

swc-jesse
Copy link

Assuming that the current context has a project breaks the panel from loading in ShotGrid Desktop using this example.

Comment on lines +1238 to +1240
project_id = None
if self._app.context.project:
project_id = self._app.context.project["id"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I see this can be changed to a simplified version such as:

Suggested change
project_id = None
if self._app.context.project:
project_id = self._app.context.project["id"]
project_id = self._app.context.project.get("id")

However, will bring other unexpected errors having a project_id as None? Can you share the log lines when the panel breaks, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants