From 067742218d2527d5eeec33e2c42c65aed4612d89 Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Aug 31 2016 09:54:22 +0000 Subject: Avoid 'NoneType' not iterable error when ADMIN_GROUP is set to None --- diff --git a/pagure/__init__.py b/pagure/__init__.py index e153233..1b76c0e 100644 --- a/pagure/__init__.py +++ b/pagure/__init__.py @@ -277,7 +277,7 @@ def is_admin(): admins = APP.config['ADMIN_GROUP'] if isinstance(admins, basestring): admins = [admins] - admins = set(admins) + admins = set(admins or []) groups = set(flask.g.fas_user.groups) return not groups.isdisjoint(admins)