Skip to content

Commit

Permalink
fixed incorrect .get() call when loading subscriptions.remoteResources (
Browse files Browse the repository at this point in the history
#734)

* fixed incorrect .get() call when loading subscriptions.remoteResources

* trigger build

* Trigger Build

* eslint
  • Loading branch information
rmgraham committed Jan 11, 2021
1 parent e9c332a commit 0db0273
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/apollo/utils/applyQueryFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const applyQueryFieldsToSubscriptions = async(subs, queryFields={}, args, contex
await applyQueryFieldsToResources(remoteResources, queryFields.remoteResources, args, context);

var remoteResourcesBySubUuid = _.groupBy(remoteResources, (rr)=>{
return rr.searchableData.get('annotations["deploy_razee_io_clustersubscription"]');
return _.get(rr, 'searchableData[\'annotations["deploy_razee_io_clustersubscription"]\']');
});
_.each(subs, (sub)=>{
var rrs = remoteResourcesBySubUuid[sub.uuid] || [];
Expand All @@ -271,7 +271,7 @@ const applyQueryFieldsToSubscriptions = async(subs, queryFields={}, args, contex
var errorCount = 0;
var successCount = 0;
_.each(rrs, (rr)=>{
var errors = _.toArray(rr.searchableData.get('errors')||[]);
var errors = _.toArray(_.get(rr, 'searchableData.errors',[]));
if(errors.length > 0){
errorCount += 1;
}
Expand Down

0 comments on commit 0db0273

Please sign in to comment.