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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
Maják
Commits
3c15c3b4
Commit
3c15c3b4
authored
1 year ago
by
Tomáš Valenta
Browse files
Options
Downloads
Patches
Plain Diff
fix shared articles
parent
6077d281
No related branches found
No related tags found
2 merge requests
!876
Fix shared articles & release elections web
,
!874
Fix shared articles
Pipeline
#16275
passed
1 year ago
Stage: build
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
shared/models/base.py
+1
-0
1 addition, 0 deletions
shared/models/base.py
shared/models/main.py
+3
-7
3 additions, 7 deletions
shared/models/main.py
with
4 additions
and
7 deletions
shared/models/base.py
+
1
−
0
View file @
3c15c3b4
...
...
@@ -519,6 +519,7 @@ class ArticlesMixin:
key_fields_default_values
=
{
"
union_thumb_image_id
"
:
F
(
"
search_image_id
"
),
"
union_is_black
"
:
Value
(
False
,
models
.
BooleanField
()),
"
union_article_type
"
:
Value
(
2
,
models
.
PositiveSmallIntegerField
()),
}
...
...
This diff is collapsed.
Click to expand it.
shared/models/main.py
+
3
−
7
View file @
3c15c3b4
...
...
@@ -267,7 +267,6 @@ class MainHomePageMixin(
self
.
append_all_shared_articles_query
(
self
.
article_page_model
.
objects
.
live
().
all
()
)
.
live
()
.
order_by
(
"
-union_date
"
)[:
3
]
)
...
...
@@ -448,9 +447,8 @@ class MainArticlesPageMixin(
def
get_base_shared_articles_query
(
self
,
filter
:
models
.
Q
):
return
self
.
materialize_shared_articles_query
(
self
.
append_all_shared_articles_query
(
self
.
root_page
.
article_page_model
.
objects
.
filter
(
filter
)
self
.
root_page
.
article_page_model
.
objects
.
filter
(
filter
)
.
live
().
all
()
)
.
live
()
.
order_by
(
"
-union_date
"
)
)
...
...
@@ -550,9 +548,8 @@ class MainArticlesPageMixin(
)
!=
0
and
(
self
.
materialize_shared_articles_query
(
self
.
append_all_shared_articles_query
(
self
.
root_page
.
article_page_model
.
objects
.
filter
(
search_filter
)
self
.
root_page
.
article_page_model
.
objects
.
filter
(
search_filter
)
.
live
().
all
()
)
.
live
()
.
order_by
(
"
union_date
"
)[:
2
]
# LIMIT 2
)[
0
]
not
in
article_timeline_list
[
-
1
][
"
articles
"
]
...
...
@@ -597,9 +594,8 @@ class MainArticlesPageMixin(
self
.
append_all_shared_articles_query
(
self
.
root_page
.
article_page_model
.
objects
.
filter
(
search_filter
).
live
().
all
()
)
)
.
live
()
.
order_by
(
"
union_date
"
)[:
2
]
# LIMIT 2
)[
0
]
not
in
article_timeline_list
[
-
1
][
"
articles
"
]
...
...
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