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

Handle content errors without a folder #576

Conversation

michael-erasmus
Copy link
Contributor

Change description

Using spectacles on my company's Looker instance, I ran into error caused by (I think) the same issue as reported here: #327

Encountered unexpected AttributeError: "'NoneType' object has no attribute 'get'"

The PR to fix this issue didn't seem to work in my case though, since the call to content[content_type]["folder"] returns a None, it's the folder that's not set, not the id attribute.

This change fixed the error for me locally.

Type of change

  • Bug fix (fixes an issue)

Related issues

Closes #327

Code review

  • Pull request has a descriptive title and context useful to a reviewer

Copy link
Collaborator

@joshtemple joshtemple left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @michael-erasmus! This looks great, I'll merge it in.

@joshtemple joshtemple merged commit 93dea44 into spectacles-ci:master Jun 2, 2022
@michael-erasmus michael-erasmus deleted the hotfix/none-folder-content-errors branch June 2, 2022 15:44
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.

TypeError: 'NoneType' object is not subscriptable
2 participants