Merge pull request #770 from jessopb/fix741

ensures that getClaimIdByLongChannelId tests for bidstate
This commit is contained in:
Shawn K 2018-11-29 20:28:07 -06:00 committed by GitHub
commit e265052d4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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 => {

View file

@ -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 => {