Skip to content

Commit

Permalink
fix: minor fix for node-robot permission creation
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Nov 12, 2024
1 parent 00a447c commit ff45808
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions packages/server-core/src/services/node-robot/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ export class NodeRobotService {
.warn(`The node-robot permission could not be created, due non existing permission ${permissionNames[i]}.`);
}

await this.authup.robotPermission.create({
robot_id: robot.id,
permission_id: permission.id,
});
if (permission) {
await this.authup.robotPermission.create({
robot_id: robot.id,
permission_id: permission.id,
});
}
}
}
}

0 comments on commit ff45808

Please sign in to comment.