[PATCH 4/4] Test on the variable not a string

Pierre-Yves Chibon pingou at pingoured.fr
Sun Mar 10 09:55:51 UTC 2013


---
 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 a51bad6..23cf911 100644
--- a/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -114,7 +114,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()
-- 
1.7.1



More information about the copr-devel mailing list