From 0a65906130c5a753e999368d955280fe78224b45 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 29 Nov 2018 17:01:01 -0500 Subject: [PATCH] ensures that getClaimIdByLongChannelId tests for bidstate --- server/chainquery/bundle.js | 2 +- server/chainquery/queries/claimQueries.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/chainquery/bundle.js b/server/chainquery/bundle.js index bcbc3012..4a96169b 100644 --- a/server/chainquery/bundle.js +++ b/server/chainquery/bundle.js @@ -917,7 +917,7 @@ var claimQueries = (db, table, sequelize) => ({ getClaimIdByLongChannelId: async (channelClaimId, claimName) => { logger$1.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`); return await table.findAll({ - where: { name: claimName, publisher_id: channelClaimId }, + where: { name: claimName, publisher_id: channelClaimId, bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] } }, order: [['id', 'ASC']], }) .then(result => { diff --git a/server/chainquery/queries/claimQueries.js b/server/chainquery/queries/claimQueries.js index 174c897d..cf4b532b 100644 --- a/server/chainquery/queries/claimQueries.js +++ b/server/chainquery/queries/claimQueries.js @@ -116,7 +116,7 @@ export default (db, table, sequelize) => ({ getClaimIdByLongChannelId: async (channelClaimId, claimName) => { logger.debug(`finding claim id for claim ${claimName} from channel ${channelClaimId}`); return await table.findAll({ - where: { name: claimName, publisher_id: channelClaimId }, + where: { name: claimName, publisher_id: channelClaimId, bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] } }, order: [['id', 'ASC']], }) .then(result => {