Repository navigation
adds saved searches api and models - #116
Merged
Merged
Conversation
Closed
aarongundel
force-pushed
the
adg/saved-searches
branch
from
March 19, 2026 20:33
9e5e929 to
9c08831
Compare
aarongundel
marked this pull request as ready for review
March 19, 2026 20:39
chiatt
requested changes
Mar 19, 2026
| saved_search=saved_search, group_id=group_id | ||
| ) | ||
|
|
||
| saved_search.refresh_from_db() |
Member
There was a problem hiding this comment.
This doesn't seem necessary at this point
Contributor
Author
There was a problem hiding this comment.
This was added to grab the "created_at" field and return it as part of the post response. But there's no particular reason to include it, unless the user for some reason wanted to verify that the field was actually populated (it's null after "create" because the value comes from the db.). For now I'll just add an arg to skip serializing it on post.
| group_shared = SavedSearch.objects.filter( | ||
| shared_groups__group__in=request.user.groups.all() | ||
| ) | ||
| qs = (user_shared | group_shared).exclude(creator=request.user).distinct() |
Member
There was a problem hiding this comment.
Maybe saved_searches instead of qs just to be a bit more explicit?
Co-authored-by: Cyrus Hiatt <chiatt@fargeo.com>
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.
Adds a saved search api/models