diff --git a/organize/util.py b/organize/util.py index 6d97f0a..79a15eb 100644 --- a/organize/util.py +++ b/organize/util.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2013 Helmut Merz helmutm@cy55.de +# Copyright (c) 2017 Helmut Merz helmutm@cy55.de # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -134,6 +134,8 @@ def getGroupsForPrincipal(principal=None): if principal is None: principal = getCurrentPrincipal() gf = getGroupsFolder() + if gf is None: + return [] prefix = 'gloops.' return [(g.startswith(prefix) and g[len(prefix):] or g) for g in gf.getGroupsForPrincipal(principal.id)]