Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Maják
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
b1c4b13b
Commit
b1c4b13b
authored
1 year ago
by
Tomáš Valenta
Browse files
Options
Downloads
Patches
Plain Diff
fix search results sorting
parent
92b9bce6
No related branches found
No related tags found
2 merge requests
!905
fix search results sorting
,
!904
Fix search results sorting
Pipeline
#16412
passed
1 year ago
Stage: build
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/models/main.py
+3
-1
3 additions, 1 deletion
shared/models/main.py
with
3 additions
and
1 deletion
shared/models/main.py
+
3
−
1
View file @
b1c4b13b
...
@@ -789,7 +789,9 @@ class MainSearchPageMixin(
...
@@ -789,7 +789,9 @@ class MainSearchPageMixin(
# Put results without a timestamp first, as they'll be person litsings etc.
# Put results without a timestamp first, as they'll be person litsings etc.
key
=
lambda
result
:
result
.
timestamp
key
=
lambda
result
:
result
.
timestamp
if
hasattr
(
result
,
"
timestamp
"
)
if
hasattr
(
result
,
"
timestamp
"
)
else
datetime
.
date
(
year
=
9999
,
month
=
1
,
day
=
1
),
else
datetime
.
datetime
(
year
=
9999
,
month
=
1
,
day
=
1
).
replace
(
tzinfo
=
datetime
.
timezone
.
utc
),
reverse
=
True
,
reverse
=
True
,
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment