Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-newsbox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
WebU
shared
django-newsbox
Commits
9f79822f
Commit
9f79822f
authored
9 years ago
by
Camille Périnel
Browse files
Options
Downloads
Patches
Plain Diff
Fix news without translations
parent
5d2039e9
No related branches found
Branches containing commit
Tags
0.4.2
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
newsbox_i18n/models.py
+2
-0
2 additions, 0 deletions
newsbox_i18n/models.py
with
2 additions
and
0 deletions
newsbox_i18n/models.py
+
2
−
0
View file @
9f79822f
...
...
@@ -67,6 +67,8 @@ class NewsboxI18NBase(six.with_metaclass(NewsboxI18NModelBase, TranslatableModel
language
=
current_language
if
language
not
in
self
.
get_available_languages
():
if
not
self
.
get_available_languages
():
return
None
language
=
(
list
(
self
.
get_fallback_languages
())
+
list
(
self
.
get_available_languages
()))[
0
]
activate
(
language
)
...
...
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