Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

superfluous if(org) code #1267

Open
ElectricNroff opened this issue Aug 20, 2024 · 0 comments
Open

superfluous if(org) code #1267

ElectricNroff opened this issue Aug 20, 2024 · 0 comments

Comments

@ElectricNroff
Copy link
Contributor

if (!org) {
logger.info({ uuid: req.ctx.uuid, message: shortName + ' organization could not be updated in MongoDB because it does not exist.' })
return res.status(404).json(error.orgDnePathParam(shortName))
}


I feel that line 366 makes the code harder to read. The org in if (org) is guaranteed to be truthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs Triage
Development

No branches or pull requests

2 participants