Skip to content

Commit

Permalink
fix: shouldUpdate is false, do not try to update redis
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Oct 28, 2017
1 parent 0c5eb55 commit 8e1b9a5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/actions/agreement/bill.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ function agreementBill({ params: input }) {
}

function saveToRedis(data) {
// no updates yet - skip to next
if (data.shouldUpdate === false) {
return data;
}

const path = `${prefix}.${postfix.updateMetadata}`;
const planFreq = get(data, 'agreement.plan.payment_definitions[0].frequency', 'month').toLowerCase();
const sub = find(data.subs, { name: planFreq });
Expand Down

0 comments on commit 8e1b9a5

Please sign in to comment.