-
Notifications
You must be signed in to change notification settings - Fork 16
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
Include plugin data in comment serialization, to obtain data for hearing visualization #168
Conversation
I don't think this is a good idea, or at the very least it should be parametrized. Plugin data is potentially very large, and downloading all of it for every request (even those for the regular UI) is probably not actually desired. |
f3e85bb
to
c16f8bc
Compare
Missing tests for both new features added. |
filtered_queryset = queryset.filter(**{queryset.model.parent_field: self.get_comment_parent_id()}) | ||
request = self.get_serializer_context().get('request', None) | ||
if request: | ||
auth_code = request.GET.get('auth_code', None) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The request arg should probably be called authorization_code
too.
How about using some sort of actual DRF filtering mechanism instead of hard-coding only one filter though?
dc5ccfe
to
0faae22
Compare
comment_data = get_comment_data(authorization_code="foo6") | ||
url = get_hearing_detail_url(default_hearing.id, 'comments') | ||
api_client.post(url, comment_data) | ||
data = get_data_from_response(api_client.get(url+'?authorization_code=foo6')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Client.get()
accepts the query string as a second parameter:
api_client.get(url, {"authorization_code": "foo6"})
Can you add a test that ensures that plugin data is not included when you don't pass in the |
62836cf
to
06ef800
Compare
Let's do this! Thanks. |
No description provided.