Skip to content

Commit

Permalink
Fix: remove null organization_ids
Browse files Browse the repository at this point in the history
  • Loading branch information
georgipavlov-7DIGIT committed Sep 26, 2024
1 parent b612e9c commit bc64bb4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/middlewares/populateMiddleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ export const populateProvider = async (req, res, next) => {
req.provider = provider;
}

req.provider.organizations =
req.provider.ogranizations?.filter((x) => !!x.organization_id) || [];

return next();
};

Expand Down

0 comments on commit bc64bb4

Please sign in to comment.