Explorar el Código

workspaceSchema inherit from workspace digest

Guénaël Muller hace 6 años
padre
commit
4906883661
Se han modificado 1 ficheros con 4 adiciones y 10 borrados
  1. 4 10
      tracim/views/core_api/schemas.py

+ 4 - 10
tracim/views/core_api/schemas.py Ver fichero

69
     icon = marshmallow.fields.String()
69
     icon = marshmallow.fields.String()
70
 
70
 
71
 
71
 
72
-class WorkspaceSchema(marshmallow.Schema):
72
+class WorkspaceDigestSchema(marshmallow.Schema):
73
     id = marshmallow.fields.Int()
73
     id = marshmallow.fields.Int()
74
-    slug = marshmallow.fields.String()
75
     label = marshmallow.fields.String()
74
     label = marshmallow.fields.String()
76
-    description = marshmallow.fields.String()
77
     sidebar_entries = marshmallow.fields.Nested(
75
     sidebar_entries = marshmallow.fields.Nested(
78
         WorkspaceMenuEntrySchema,
76
         WorkspaceMenuEntrySchema,
79
         many=True,
77
         many=True,
80
     )
78
     )
81
 
79
 
82
 
80
 
83
-class WorkspaceDigestSchema(marshmallow.Schema):
84
-    id = marshmallow.fields.Int()
85
-    label = marshmallow.fields.String()
86
-    sidebar_entries = marshmallow.fields.Nested(
87
-        WorkspaceMenuEntrySchema,
88
-        many=True,
89
-    )
81
+class WorkspaceSchema(WorkspaceDigestSchema):
82
+    slug = marshmallow.fields.String()
83
+    description = marshmallow.fields.String()
90
 
84
 
91
 
85
 
92
 class WorkspaceMemberSchema(marshmallow.Schema):
86
 class WorkspaceMemberSchema(marshmallow.Schema):