Skip to content

Commit

Permalink
fix: omit undefined query condition for no package_hash update check
Browse files Browse the repository at this point in the history
  • Loading branch information
rocwind committed Aug 23, 2021
1 parent 247a7ab commit 6dbe8df
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions core/services/client-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,13 @@ proto.updateCheck = function (deploymentKey, appVersion, label, packageHash, cli
!_.eq(_.get(packages, 'package_hash', ''), packageHash)
) {
return models.PackagesDiff.findOne({
where: {
package_id: packages.id,
diff_against_package_hash: packageHash,
},
where: _.omitBy(
{
package_id: packages.id,
diff_against_package_hash: packageHash,
},
_.isUndefined,
),
}).then((diffPackage) => {
if (!_.isEmpty(diffPackage)) {
rs.downloadURL = common.getBlobDownloadUrl(
Expand Down

0 comments on commit 6dbe8df

Please sign in to comment.