diff --git a/ynr/apps/parties/api/next/api_views.py b/ynr/apps/parties/api/next/api_views.py index 088c067f5..4c2d0e51f 100644 --- a/ynr/apps/parties/api/next/api_views.py +++ b/ynr/apps/parties/api/next/api_views.py @@ -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"] = []