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
Scottx611x/tool manager views cleanup #2991
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2991 +/- ##
===========================================
- Coverage 59.52% 59.45% -0.07%
===========================================
Files 433 433
Lines 27286 27212 -74
Branches 1274 1274
===========================================
- Hits 16241 16180 -61
+ Misses 11045 11032 -13
Continue to review full report at Codecov.
|
…low and visualization tools
…nager_views_cleanup
…nager_views_cleanup
WorkflowTool.objects.filter(dataset=self.data_set) | ||
) | ||
tool_type = self.request.query_params.get("tool_type") | ||
if tool_type is 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.
@scottx611x Any user can hit this endpoint and grab analyses or visualizations with a dataSetUuid. Thoughts?
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.
Ah, this is just the get_queryset
method. The permission logic happens in the list()
Actually looking into if I can use DRF permission_classes
here instead.
@@ -14,7 +14,7 @@ | |||
query: { | |||
method: 'GET', | |||
isArray: true, | |||
params: { dataSetUuid: '' } | |||
params: { data_set_uuid: '' } |
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.
Sure, since it's a url query. Worth noting for json it's camelCase styling. https://google.github.io/styleguide/jsoncstyleguide.xml?showone=Property_Name_Format#Property_Name_Format
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.
Yeah I wasn't sold on one way vs. the other, but I can change the backend code to work with dataSetUuid
I came across this split (extra logic for handling
data_set_uuid
vs.dataSetUuid
) the other day, and figured it would be good to take care of.I've also gone ahead and refactored to remove some redundancies and unclear code placement.