From f05e684b31e9190e6df682dcf0c9da33d5218fb9 Mon Sep 17 00:00:00 2001 From: Charlton Austin Date: Tue, 1 Aug 2017 13:09:41 -0400 Subject: [PATCH] fix(superuser_models_pre_oci): have None for approver ### Description of Changes this fixes a null pointer exception Issue: https://coreosdev.atlassian.net/browse/QUAY-fix_bug_superuser_panel ## Reviewer Checklist - [ ] It works! - [ ] Comments provide sufficient explanations for the next contributor - [ ] Tests cover changes and corner cases - [ ] Follows Quay syntax patterns and format --- endpoints/api/superuser_models_pre_oci.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/endpoints/api/superuser_models_pre_oci.py b/endpoints/api/superuser_models_pre_oci.py index 93a3ebe21..e1aefe75f 100644 --- a/endpoints/api/superuser_models_pre_oci.py +++ b/endpoints/api/superuser_models_pre_oci.py @@ -38,6 +38,8 @@ def _create_log(log, log_kind): def _create_user(user): + if user is None: + return None return User(user.username, user.email, user.verified, user.enabled, user.robot)