From 66dd261fa217784fe263aaa898ba6a3ce9aecae3 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Sep 07 2016 10:08:22 +0000 Subject: Drop the check if the dbobj retrieved is of some length or not --- diff --git a/pagure/ui/plugins.py b/pagure/ui/plugins.py index 2c41394..a8997ba 100644 --- a/pagure/ui/plugins.py +++ b/pagure/ui/plugins.py @@ -101,8 +101,7 @@ def view_plugin(repo, plugin, username=None, full=True): dbobj = getattr(repo, plugin.backref) # There should always be only one, but let's double check - if dbobj and len(dbobj) > 0: - dbobj = dbobj[0] + if dbobj: new = False else: dbobj = plugin.db_object()