From 54f3ca692489561176bff79ded121681c3673fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 19 Jul 2016 14:03:58 +0200 Subject: [PATCH] project_manage_users: Prevent internal error when the user can't be found. --- pillar/application/modules/projects.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pillar/application/modules/projects.py b/pillar/application/modules/projects.py index 742f6b2d..ecbc4687 100644 --- a/pillar/application/modules/projects.py +++ b/pillar/application/modules/projects.py @@ -317,6 +317,9 @@ def project_manage_users(): {'username': 1, 'email': 1, 'full_name': 1}) + if not user: + return jsonify({'_status': 'ERROR'}), 404 + user['_status'] = 'OK' return jsonify(user)