浏览代码

Fix marshallow schema

Guénaël Muller 7 年前
父节点
当前提交
4701a2b664
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tracim/views/core_api/schemas.py

+ 2 - 2
tracim/views/core_api/schemas.py 查看文件

3
 
3
 
4
 
4
 
5
 class ProfileSchema(marshmallow.Schema):
5
 class ProfileSchema(marshmallow.Schema):
6
-    id = marshmallow.fields.Int(dump_only=True, required=True)
6
+    id = marshmallow.fields.Int(dump_only=True)
7
     name = marshmallow.fields.String()
7
     name = marshmallow.fields.String()
8
 
8
 
9
 
9
 
10
 class UserSchema(marshmallow.Schema):
10
 class UserSchema(marshmallow.Schema):
11
-    user_id = marshmallow.fields.Int(dump_only=True, required=True)
11
+    user_id = marshmallow.fields.Int(dump_only=True)
12
     email = marshmallow.fields.Email(required=True)
12
     email = marshmallow.fields.Email(required=True)
13
     display_name = marshmallow.fields.String()
13
     display_name = marshmallow.fields.String()
14
     created = marshmallow.fields.DateTime(format='iso8601')
14
     created = marshmallow.fields.DateTime(format='iso8601')