Skip to content

Commit

Permalink
Merge pull request #576 from michael-erasmus/hotfix/none-folder-conte…
Browse files Browse the repository at this point in the history
…nt-errors

Handle content errors without a folder
  • Loading branch information
joshtemple authored Jun 2, 2022
2 parents ddebc9d + 0cc349d commit 93dea44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spectacles/validators/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def is_folder_selected(folder_id: Optional[str]) -> bool:
continue

# Sometimes the content no longer exists, in which case the folder is None
folder_id: Optional[str] = content[content_type]["folder"].get("id")
folder = content[content_type].get("folder")
folder_id: Optional[str] = folder.get("id") if folder else None
# If exclude_personal isn't specified, personal_folders list is empty
if not is_folder_selected(folder_id):
continue
Expand Down

0 comments on commit 93dea44

Please sign in to comment.