Fix error when updating website.

This commit is contained in:
Brian Cao 2022-11-21 11:39:59 -08:00
parent 82d1f1ba2c
commit 371425ab60
2 changed files with 2 additions and 2 deletions

View file

@ -41,7 +41,7 @@ export default async (
if (req.method === 'POST') {
const { ...data } = req.body;
if (!data.userId && !data.teamId) {
if (data.userId && data.userId === null && data.teamId && data.teamId === null) {
badRequest(res, 'A website must be assigned to a User or Team.');
}