class RepositoryFilesSchema(MarshmallowBase): # TODO: Add exlude=[] parameter here to skip redundant date and id fields. file_patch = ma.Method('get_patch') def get_patch(self, obj): return 'DEPRECATED' markers = ma.Nested(RepositoryFileMarkersSchema, many=True) comments = ma.Nested(RepositoryFileCommentsSchema, many=True) class Meta(MarshmallowBase.Meta): model = RepositoryFiles
class RepositoryFilesSchema(MarshmallowBase): # TODO: Add exlude=[] parameter here to skip redundant date and id fields. # pylint: disable=no-member file_patch = ma.Method("get_patch") markers = ma.Nested(RepositoryFileMarkersSchema, many=True) comments = ma.Nested(RepositoryFileCommentsSchema, many=True) # pylint: enable=no-member @staticmethod def get_patch(obj): del obj return "DEPRECATED" class Meta(MarshmallowBase.Meta): model = RepositoryFiles