Skip to content

Commit

Permalink
just update sample if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
pallavi2209 committed Mar 10, 2017
1 parent 08f05fe commit 9e1130b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cache/models/samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ function upsertOneSample(sampleQueryBodyObj, method, isBulk) {
// sampleQueryBodyObj updated with fields
createSampHsetCommand(sampleQueryBodyObj, sample, aspectObj);

// if sample exists, just update sample.
if (sample) {
return redisClient.hmsetAsync(sampleKey, sampleQueryBodyObj);
}

// add aspect name to subject set, add sample key to sample set,
// create/update hash of sample
return redisClient.batch([
Expand Down

0 comments on commit 9e1130b

Please sign in to comment.