Commit 94e3de4b by Őry Máté

dashboard: refactor GroupCodeMixin

parent 932297bf
......@@ -17,6 +17,7 @@
from __future__ import unicode_literals, absolute_import
from itertools import chain
from os import getenv
import json
import logging
......@@ -108,13 +109,8 @@ class GroupCodeMixin(object):
attributes = identity[0]
owneratrs = getattr(
groups = []
for i in owneratrs:
groups += attributes[i]
except KeyError:
for group in groups:
for group in chain(*[attributes[i]
for i in owneratrs if i in attributes]):
except Group.DoesNotExist:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment