diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2017-12-22 13:10:25 +1300 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2018-01-09 17:15:35 +1300 |
commit | d728f563111d8ff4403abc596bd468e94be7e417 (patch) | |
tree | 43c425eca485f59842f950daccb83c2e2c4f64c4 /layerindex | |
parent | bc26b95d0b2f27d7fb34f067a284ef0184b0a77d (diff) | |
download | openembedded-core-contrib-d728f563111d8ff4403abc596bd468e94be7e417.tar.gz |
Fix error on publish if no non-root superuser/staff accounts exist
We need to set a default for this variable or you get an
UnboundLocalError if no non-root superuser/staff accounts are set up in
the database.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'layerindex')
-rw-r--r-- | layerindex/views.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/layerindex/views.py b/layerindex/views.py index ccb85b80a2..5b111a3e52 100644 --- a/layerindex/views.py +++ b/layerindex/views.py @@ -270,6 +270,7 @@ def publish(request, name): bodytext = get_template('layerindex/publishemail.txt') maintainer_names = [m.name for m in maintainers] # find appropriate help contact + help_contact = None for user in User.objects.all(): if user.username != 'root' and (user.is_staff or user.is_superuser) and user.is_active: help_contact = user |