From 39d661feff2f2b2cae14483b028c9ef3a0b4f680 Mon Sep 17 00:00:00 2001 From: Teemu Patja Date: Tue, 7 Nov 2017 18:16:38 +0200 Subject: [PATCH] Fix confirmed-payouts query Fixes this use case: - two competing claims - one merged and signed-off -> GH paid comment shows wrong username in --- resources/sql/queries.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/sql/queries.sql b/resources/sql/queries.sql index 9399a8f..397040f 100644 --- a/resources/sql/queries.sql +++ b/resources/sql/queries.sql @@ -315,6 +315,7 @@ WHERE p.issue_id = i.issue_id AND p.repo_id = i.repo_id AND r.repo_id = i.repo_id +AND p.state = 1 AND u.id = p.user_id AND i.payout_receipt IS NULL AND i.payout_hash IS NOT NULL;