Skip to content

Commit

Permalink
add: comment
Browse files Browse the repository at this point in the history
  • Loading branch information
enzomerca authored Aug 21, 2024
1 parent 8c0c265 commit 9173bc5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions node/resolvers/Mutations/Users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ export const addUser = async (_: any, params: any, ctx: Context) => {
params.costId
)

// before adding an user to a cost center we check if the cost
// center exists and if it has a valid name, otherwise both
// login and UI might break.
if (
!costCenter?.data?.getCostCenterById?.name ||
params.orgId !== costCenter.data?.getCostCenterById?.organization
Expand Down

0 comments on commit 9173bc5

Please sign in to comment.