[copr] master: Test on the variable not a string (fcba438)

pingou at fedoraproject.org pingou at fedoraproject.org
Wed Mar 13 09:04:17 UTC 2013


Repository : http://git.fedorahosted.org/cgit/copr.git

On branch  : master

>---------------------------------------------------------------

commit fcba438128efc6a2cd7fd00af8ea3aff0945d286
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date:   Sun Mar 10 10:22:57 2013 +0100

    Test on the variable not a string


>---------------------------------------------------------------

 coprs_frontend/coprs/views/api_ns/api_general.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/coprs_frontend/coprs/views/api_ns/api_general.py b/coprs_frontend/coprs/views/api_ns/api_general.py
index f3a7a8f..45471c5 100644
--- a/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -110,7 +110,7 @@ def api_coprs_by_owner(username=None):
     """
     username = flask.request.args.get('username', None) or username
     httpcode = 200
-    if 'username':
+    if username:
         query = coprs_logic.CoprsLogic.get_multiple(flask.g.user,
             user_relation='owned', username=username)
         repos = query.all()



More information about the copr-devel mailing list