diff --git a/fbchat/graphql.py b/fbchat/graphql.py index f023a163..8fc8b6eb 100644 --- a/fbchat/graphql.py +++ b/fbchat/graphql.py @@ -302,8 +302,8 @@ def graphql_to_group(group): color=c_info.get('color'), emoji=c_info.get('emoji'), admins = set([node.get('id') for node in group.get('thread_admins')]), - approval_mode = bool(group.get('approval_mode')), - approval_requests = set(node["requester"]['id'] for node in group['group_approval_queue']['nodes']), + approval_mode = bool(group.get('approval_mode')) if group.get('approval_mode') is not None else None, + approval_requests = set(node["requester"]['id'] for node in group['group_approval_queue']['nodes']) if group.get('group_approval_queue') else None, join_link = group['joinable_mode'].get('link'), photo=group['image'].get('uri'), name=group.get('name'),