From 241c3357d13ac2fb4c8ffca6469e575388c1fac5 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 13 May 2019 14:37:30 +0200 Subject: Fix account description error --- server/models/account/account.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/models/account/account.ts') diff --git a/server/models/account/account.ts b/server/models/account/account.ts index c53312990..2b04acd86 100644 --- a/server/models/account/account.ts +++ b/server/models/account/account.ts @@ -3,7 +3,7 @@ import { BeforeDestroy, BelongsTo, Column, - CreatedAt, + CreatedAt, DataType, Default, DefaultScope, ForeignKey, @@ -26,7 +26,7 @@ import { VideoCommentModel } from '../video/video-comment' import { UserModel } from './user' import { AvatarModel } from '../avatar/avatar' import { VideoPlaylistModel } from '../video/video-playlist' -import { WEBSERVER } from '../../initializers/constants' +import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants' import { Op, Transaction, WhereOptions } from 'sequelize' export enum ScopeNames { @@ -91,7 +91,7 @@ export class AccountModel extends Model { @AllowNull(true) @Default(null) @Is('AccountDescription', value => throwIfNotValid(value, isAccountDescriptionValid, 'description', true)) - @Column + @Column(DataType.STRING(CONSTRAINTS_FIELDS.USERS.DESCRIPTION.max)) description: string @CreatedAt -- cgit v1.2.3