handle tags being null

in db, we store things as null (not set). but in rest api, we require
the fields to be strings/arrays.
This commit is contained in:
Girish Ramakrishnan
2019-03-23 15:00:21 -07:00
parent ee76c2c06e
commit edd2c5f779
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -299,7 +299,7 @@ function validateLabel(label) {
}
function validateTags(tags) {
assert(Array.isArray(tags), 'tags must be an array');
if (tags === null) return null;
if (tags.length > 64) return new AppsError(AppsError.BAD_FIELD, 'Can only set up to 64 tags');