Skip to content

Commit

Permalink
add conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
sharadsw committed Aug 14, 2024
1 parent 5406f69 commit bed9ff8
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,18 @@ export const businessRuleDefs: MappedBusinessRuleDefs = {
}

// Set the default CoType
collectionObject
.rgetPromise('collection')
.then((collection) =>
collectionObject.set(
'collectionObjectType',
collection.get('collectionObjectType')
)
);
if (collectionObject.get('collectionObjectType') === undefined)
collectionObject
.rgetPromise('collection')
.then((collection) =>
{
collectionObject.set(
'collectionObjectType',
collection.get('collectionObjectType')
)
console.log("test")
}
);
},
fieldChecks: {
collectionObjectType: (resource) => {
Expand Down

0 comments on commit bed9ff8

Please sign in to comment.