Draft
Conversation
jsh2134
commented
Dec 1, 2020
| # TODO | ||
| params['ancestor_id'] = self.id | ||
| params['limit'] = 1000 | ||
| return super(Object, self).search(query, **params) |
Contributor
Author
There was a problem hiding this comment.
I believe I left this TODO in here in order to determine if there should be a recursive option. Should the user be able to get anything in this folder, or just depth=0 objects.
and/or ancestor_id needs to be replaced by parent_object_id (although the server may handle this)
This PR needs tests
Contributor
There was a problem hiding this comment.
Lets keep it ancestor_id so that it is recursive. Users can pass depth=0 if they want, and we will document this.
davecap
reviewed
Mar 10, 2021
| return self.objects(query=query, **params) | ||
|
|
||
| def search(self, query='', **params): | ||
| query = query or params.pop('query', '') |
davecap
reviewed
Mar 10, 2021
| # TODO | ||
| params['ancestor_id'] = self.id | ||
| params['limit'] = 1000 | ||
| return super(Object, self).search(query, **params) |
Contributor
There was a problem hiding this comment.
Object.search(), super not necessary because search is a classmethod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Search from within the folders/files/dataset shortcuts in the same way as
Object.search, but scope it to the shortcut in both location and object typeThe following searches can be replaced with one nice command
become