Skip to content

Don't assume project in context.#73

Open
swc-jesse wants to merge 4 commits into
shotgunsoftware:masterfrom
StudioWildcard:master
Open

Don't assume project in context.#73
swc-jesse wants to merge 4 commits into
shotgunsoftware:masterfrom
StudioWildcard:master

Conversation

@swc-jesse

Copy link
Copy Markdown

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

Comment thread python/app/dialog.py
Comment on lines +1238 to +1240
project_id = None
if self._app.context.project:
project_id = self._app.context.project["id"]

Copy link
Copy Markdown
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