From 57e07db972706c3366ed8f999d8d4626aa79975b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 14 Jun 2016 09:45:20 +0200 Subject: [PATCH] Prevent set(None) call --- pillar/application/modules/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pillar/application/modules/service.py b/pillar/application/modules/service.py index db8525d1..92ac874b 100644 --- a/pillar/application/modules/service.py +++ b/pillar/application/modules/service.py @@ -60,7 +60,7 @@ def badger(): return 'User not found', 404 # Apply the action - roles = set(db_user['roles'] or []) + roles = set(db_user.get('roles', []) or []) if action == 'grant': roles.add(role) else: