Skip to content

Commit

Permalink
fix: my mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
toburger committed Aug 23, 2024
1 parent 4daf04b commit 5e71dc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mss_python/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def refine_getHotelList(resp: dict) -> dict:
return resp
elif "hotel" not in resp["result"] or resp["result"]["hotel"] is None:
return resp
elif resp["result"]["hotel"] is list:
elif resp["result"]["hotel"] is not list:
resp["result"]["hotel"] = [resp["result"]["hotel"]]

for hotel in resp["result"]["hotel"]:
Expand All @@ -107,5 +107,5 @@ def refine_getHotelList(resp: dict) -> dict:
def ensure_list_value(hotel: dict, parent_fld: str, child_fld: str) -> None:
if parent_fld not in hotel:
hotel[parent_fld] = {child_fld: []}
elif hotel[parent_fld][child_fld] is list:
elif hotel[parent_fld][child_fld] is not list:
hotel[parent_fld][child_fld] = [hotel[parent_fld][child_fld]]

0 comments on commit 5e71dc8

Please sign in to comment.