Skip to content

Commit

Permalink
ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
KasiaHinkson committed Feb 18, 2025
1 parent cc42389 commit 4ee77af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions parsons/zoom/zoom.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def __handle_nested_json(self, table: Table, column: str, version: int = 1) -> T
Parsons Table
"""
if version == 2:
return Table(table.unpack_list(column=column))
if column in table.columns:
return Table(table.unpack_list(column=column))
else:
return table

return Table(table.unpack_list(column=column)).unpack_dict(
column=f"{column}_0", prepend_value=f"{column}_"
Expand Down Expand Up @@ -470,7 +473,7 @@ def get_past_webinar_poll_metadata(self, webinar_id, version: int = 1) -> Table:

logger.info(f"Retrieved {tbl.num_rows} polls for meeting ID {webinar_id}")

return self.__handle_nested_json(table=tbl, column="prompts", version=version)
return self.__handle_nested_json(table=tbl, column="question_details", version=version)

def get_meeting_poll_results(self, meeting_id) -> Table:
"""
Expand Down
6 changes: 3 additions & 3 deletions test/test_airmeet.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ def test_fetch_airmeet_info(self):
assert isinstance(result["sessions"], Table), "The sessions should be a Table"
assert isinstance(result["session_hosts"], Table), "The session hosts should be a Table"
assert len(result["sessions"]) == 2, "Sessions Table should contain exactly two records"
assert len(result["session_hosts"]) == 1, (
"Session hosts Table should contain exactly one record"
)
assert (
len(result["session_hosts"]) == 1
), "Session hosts Table should contain exactly one record"

def test_fetch_airmeet_custom_registration_fields(self):
# Test get the custom registration fields for an Airmeet.
Expand Down

0 comments on commit 4ee77af

Please sign in to comment.