Skip to content

Commit

Permalink
fix: add resource id if its missing and enahnce logger
Browse files Browse the repository at this point in the history
Arun-KumarH committed Mar 15, 2024
1 parent a2ffd67 commit 3e27179
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cfg/config.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"logger": {
"console": {
"handleExceptions": false,
"level": "error",
"level": "silly",
"colorize": true,
"prettyPrint": true
},
2 changes: 1 addition & 1 deletion cfg/config_production.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"logger": {
"elasticsearch": {
"level": "error",
"level": "info",
"clientOpts": {
"node": "http://elasticsearch:9200"
},
3 changes: 3 additions & 0 deletions src/schedulingService.ts
Original file line number Diff line number Diff line change
@@ -1453,6 +1453,9 @@ export class SchedulingService implements SchedulingServiceServiceImplementation
}
} else if ((action === AuthZAction.CREATE || !resource.id) && !resource.data.meta.owners) {
let ownerAttributes = _.cloneDeep(orgOwnerAttributes);
if (!resource.id) {
resource.id = uuid.v4().replace(/-/g, '');
}
// add user as default owners
if (resource.id) {
ownerAttributes.push(

0 comments on commit 3e27179

Please sign in to comment.