Skip to content

Commit

Permalink
add null check
Browse files Browse the repository at this point in the history
  • Loading branch information
skadefro committed Nov 25, 2023
1 parent a58310c commit 740e752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenFlow/src/public/Controllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7780,7 +7780,7 @@ export class AgentsCtrl extends entitiesCtrl<Base> {
for (var i = 0; i < this.models.length; i++) {
var model = this.models[i];
var user = await NoderedUtil.Query({ collectionname: "users", query: { _id: (model as any).runas }, top: 1 });
if(user.length > 0) {
if(user != null && user.length > 0) {
// @ts-ignore
model.customerid = user[0].customerid;
}
Expand Down

0 comments on commit 740e752

Please sign in to comment.