Skip to content

Commit

Permalink
Do not compare types, use isinstance()
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed Aug 21, 2023
1 parent 7301c70 commit 0e49c29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ynr/apps/parties/api/next/api_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get(self, request, *args, **kwargs):
for party in qs:
item = {}

if type(party[1]) == list:
if isinstance(party[1], list):
# This is a party with descriptions
item["text"] = party[0]
item["children"] = []
Expand Down

0 comments on commit 0e49c29

Please sign in to comment.