-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Changing created to modified time #6234
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
Changes from 1 commit
835345f
1b23d47
599a476
0b657c3
dd8da16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,7 +160,7 @@ def record_search_query(project_slug, version_slug, query, total_results, time_s | |
project__slug=project_slug, | ||
version__slug=version_slug, | ||
created__gte=before_10_sec, | ||
).order_by('-created') | ||
).order_by('-modified') | ||
|
||
# check if partial query exists, | ||
# if yes, then just update the object. | ||
|
@@ -210,5 +210,5 @@ def record_search_query(project_slug, version_slug, query, total_results, time_s | |
version=version, | ||
query=query, | ||
) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. but There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes |
||
obj.created = time | ||
obj.modified = time | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should be removed. Also, this can be simplified to SearchQuery.objects.create(
project=project,
version=version,
query=query,
) |
||
obj.save() |
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.
I think this should also be changed to
modified__gte=before_10_sec
.