8000 fix: return dict and no structview by JoanFM · Pull Request #2692 · jina-ai/serve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: return dict and no structview #2692

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions jina/types/request/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
0