Browse Source

allow none for avatar and caldav url

Guénaël Muller 7 years ago
parent
commit
087ab47674
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tracim/views/core_api/schemas.py

+ 3 - 1
tracim/views/core_api/schemas.py View File

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