From 21c4f58de0d1f1bf5c5a03efe1fbf7f5969029ca Mon Sep 17 00:00:00 2001 From: Joan Fontanals Martinez Date: Thu, 17 Jun 2021 14:57:45 +0200 Subject: [PATCH] fix: return dict and no structview --- jina/types/request/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/jina/types/request/__init__.py b/jina/types/request/__init__.py index db4fcd6dde549..72d19b1a43a3e 100644 --- a/jina/types/request/__init__.py +++ b/jina/types/request/__init__.py @@ -242,16 +242,17 @@ def parameters(self) -> Dict: :return: a Python dict view of the tags. """ - return StructView(self._pb_body.parameters) + # if u get this u need to have it decompressed + return StructView(self.proto.parameters).dict() @parameters.setter def parameters(self, value: Dict): - """Set the `tags` field of this Document to a Python dict + """Set the `parameters` field of this Request to a Python dict :param value: a Python dict """ - self._pb_body.parameters.Clear() - self._pb_body.parameters.update(value) + self.proto.parameters.Clear() + self.proto.parameters.update(value) class Response(Request):