From 26958f6641f4437527103af1499b522f62b0fdaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 2 Aug 2019 23:44:35 +0200 Subject: [PATCH] Explicitly disallow User.name == null in model --- backend/src/models/User.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/models/User.js b/backend/src/models/User.js index cac8fd7a6..bcd9fcf35 100644 --- a/backend/src/models/User.js +++ b/backend/src/models/User.js @@ -3,7 +3,7 @@ import uuid from 'uuid/v4' module.exports = { id: { type: 'string', primary: true, default: uuid }, // TODO: should be type: 'uuid' but simplified for our tests actorId: { type: 'string', allow: [null] }, - name: { type: 'string', min: 3 }, + name: { type: 'string', disallow: [null], min: 3 }, slug: 'string', encryptedPassword: 'string', avatar: { type: 'string', allow: [null] },