Skip to content

Commit

Permalink
handle PrimarySection null case
Browse files Browse the repository at this point in the history
  • Loading branch information
fanglinfang committed Sep 23, 2024
1 parent a03b891 commit 7b0a0af
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uw_sws/section.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ def _json_to_section(section_data,
section.primary_section_id = primary_section.get("SectionID")
section.is_primary_section = (
section.primary_section_id == section.section_id)

else:
section.is_primary_section = True
section.linked_section_urls = []
for linked_section_type in section_data["LinkedSectionTypes"]:
for linked_section_data in linked_section_type["LinkedSections"]:
Expand Down

0 comments on commit 7b0a0af

Please # to comment.