Browse Source

allow none for avatar and caldav url

Guénaël Muller 6 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,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,