mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 12:29:02 +02:00
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>
This commit is contained in:
parent
bc26b95d0b
commit
d728f56311
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user