From 2535a4c734270c76052746bdc670ce364ea3cd3d Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Aug 09 2016 15:12:17 +0000 Subject: Fix the messages sent to the pagure-ci service via redis --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index 0924fe9..e46b636 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -870,7 +870,7 @@ def add_pull_request_comment(session, request, commit, tree_id, filename, if notification and request.status == 'Open' \ and request.project.ci_hook and PAGURE_CI: REDIS.publish('pagure.ci', json.dumps({ - 'ci_type': request.project.ci_hook.type_ci.type, + 'ci_type': request.project.ci_hook[0].ci_type, 'pr': request.to_json(public=True, with_comments=False) })) @@ -1239,7 +1239,7 @@ def new_pull_request(session, branch_from, # Send notification to the CI server if request.project.ci_hook and PAGURE_CI: REDIS.publish('pagure.ci', json.dumps({ - 'ci_type': request.project.ci_hook.type_ci.type, + 'ci_type': request.project.ci_hook[0].ci_type, 'pr': request.to_json(public=True, with_comments=False) }))