diff --git a/ereuse_devicehub/migrations/versions/e93aec8fc41f_added_assigned_action.py b/ereuse_devicehub/migrations/versions/e93aec8fc41f_added_assigned_action.py index 0d65cf9d..48a74602 100644 --- a/ereuse_devicehub/migrations/versions/e93aec8fc41f_added_assigned_action.py +++ b/ereuse_devicehub/migrations/versions/e93aec8fc41f_added_assigned_action.py @@ -31,7 +31,7 @@ def upgrade(): op.drop_table('allocate', schema=f'{get_inv()}') op.create_table('allocate', sa.Column('final_user_code', citext.CIText(), default='', nullable=True, - comment = "This is a internal code for mainteing the secrets of the personal datas of the new holder") + comment = "This is a internal code for mainteing the secrets of the personal datas of the new holder"), sa.Column('transaction', citext.CIText(), nullable=True, comment='The code used from the owner for relation with external tool.'), sa.Column('end_users', sa.Numeric(precision=4), nullable=True), sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False), diff --git a/ereuse_devicehub/resources/action/schemas.py b/ereuse_devicehub/resources/action/schemas.py index e32112ca..73c48140 100644 --- a/ereuse_devicehub/resources/action/schemas.py +++ b/ereuse_devicehub/resources/action/schemas.py @@ -71,7 +71,7 @@ class Allocate(ActionWithMultipleDevices): description=m.Action.start_time.comment) end_time = DateTime(data_key='endTime', required=False, description=m.Action.end_time.comment) - final_user_code = SanitizedStr(data_key="finalUserCode" + final_user_code = SanitizedStr(data_key="finalUserCode", validate=Length(min=1, max=STR_BIG_SIZE), required=False, description='This is a internal code for mainteing the secrets of the \