Make sure shortNames stay lower case

This commit is contained in:
Luke Berndt
2020-12-21 22:08:20 -05:00
parent 8b0f3ce331
commit c0190ff043

View File

@@ -228,9 +228,10 @@ exports.ownSystem = async function (req, res, next) {
// -------------------------------------------
exports.uniqueShortName = async function (req, res, next) {
console.error("locals: " + res.locals.shortName + " body: " + req.body.shortName )
try {
var system = await System.findOne({
shortName: res.locals.shortName
shortName: res.locals.shortName.toLowerCase()
});
if (system) {