소스 검색

allow none for avatar and caldav url

Guénaël Muller 7 년 전
부모
커밋
087ab47674
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      tracim/views/core_api/schemas.py

+ 3 - 1
tracim/views/core_api/schemas.py 파일 보기

@@ -17,10 +17,12 @@ class UserSchema(marshmallow.Schema):
17 17
     timezone = marshmallow.fields.String()
18 18
     # TODO - G.M - 17-04-2018 - check this, relative url allowed ?
19 19
     caldav_url = marshmallow.fields.Url(
20
+        allow_none=True,
21
+        default=None,
20 22
         relative=True,
21 23
         attribute='calendar_url'
22 24
     )
23
-    avatar_url = marshmallow.fields.Url()
25
+    avatar_url = marshmallow.fields.Url(allow_none=True, default=None)
24 26
     profile = marshmallow.fields.Nested(
25 27
         ProfileSchema,
26 28
         many=False,