Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
8ffbcd00
Commit
8ffbcd00
authored
Dec 16, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
We need to catch index error here as well
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
b46e8170
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
weblate/trans/models/translation.py
weblate/trans/models/translation.py
+1
-1
weblate/trans/views/source.py
weblate/trans/views/source.py
+1
-1
No files found.
weblate/trans/models/translation.py
View file @
8ffbcd00
...
@@ -1129,7 +1129,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
...
@@ -1129,7 +1129,7 @@ class Translation(models.Model, URLMixin, PercentMixin, LoggerMixin):
# Grab database unit
# Grab database unit
try
:
try
:
dbunit
=
self
.
unit_set
.
filter
(
checksum
=
checksum
)[
0
]
dbunit
=
self
.
unit_set
.
filter
(
checksum
=
checksum
)[
0
]
except
Unit
.
DoesNotExist
:
except
(
Unit
.
DoesNotExist
,
IndexError
)
:
continue
continue
# Indicate something new
# Indicate something new
...
...
weblate/trans/views/source.py
View file @
8ffbcd00
...
@@ -39,7 +39,7 @@ def get_source(request, project, subproject):
...
@@ -39,7 +39,7 @@ def get_source(request, project, subproject):
obj
=
get_subproject
(
request
,
project
,
subproject
)
obj
=
get_subproject
(
request
,
project
,
subproject
)
try
:
try
:
return
obj
,
obj
.
translation_set
.
all
()[
0
]
return
obj
,
obj
.
translation_set
.
all
()[
0
]
except
Translation
.
DoesNotExist
:
except
(
Translation
.
DoesNotExist
,
IndexError
)
:
raise
Http404
(
'No translation exists in this component.'
)
raise
Http404
(
'No translation exists in this component.'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment