Skip to content

Commit

Permalink
chore : minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xitija committed Oct 30, 2024
1 parent 1e53cfd commit e73eed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/adapters/postgres/user-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ export class PostgresUserService implements IServicelocator {
const validatedRoles = await this.validateRequestBody(userCreateDto, academicYearId);

// check if roles are invalid and academic year is provided
if (!Array.isArray(validatedRoles) || !validatedRoles.every(role => role instanceof Role) && academicYearId.length) {
if ((!Array.isArray(validatedRoles) || !validatedRoles.every(role => role instanceof Role)) && academicYearId?.length) {
return APIResponse.error(
response,
apiId,
Expand Down

0 comments on commit e73eed6

Please sign in to comment.