From d284e053fa2ae8b2bb6fefe068ea7e440a720185 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Feb 20 2017 09:05:15 +0000 Subject: Fix wrong variable used in jenkins_ci_notification Basically, this test is meant to check that we found the proper project in the database but instead we were checking if one of the URL variable was set, which is anyway going to be the case as otherwise the URL mapping would not work. --- diff --git a/pagure/api/ci/jenkins.py b/pagure/api/ci/jenkins.py index 6c2bb82..5cc0c87 100644 --- a/pagure/api/ci/jenkins.py +++ b/pagure/api/ci/jenkins.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """ - (c) 2016 - Copyright Red Hat Inc + (c) 2016-2017 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon @@ -46,7 +46,7 @@ def jenkins_ci_notification( project = pagure.lib.get_project( SESSION, repo, user=username, namespace=namespace) - if repo is None: + if not project: raise pagure.exceptions.APIError(404, error_code=APIERROR.ENOPROJECT) if not constant_time.bytes_eq(