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
951eed81
Commit
951eed81
authored
Jul 09, 2012
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor out filtering of child repos
parent
91ea1864
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
weblate/trans/models.py
weblate/trans/models.py
+7
-1
No files found.
weblate/trans/models.py
View file @
951eed81
...
...
@@ -458,6 +458,12 @@ class SubProject(models.Model):
messages
.
error
(
request
,
_
(
'Failed to push to remote branch on %s.'
)
%
self
.
__unicode__
())
return
False
def
get_linked_childs
(
self
):
'''
Returns list of subprojects which link repository to us.
'''
return
SubProject
.
objects
.
filter
(
repo
=
'weblate://%s/%s'
%
(
self
.
project
.
slug
,
self
.
slug
))
def
commit_pending
(
self
):
'''
Checks whether there is any translation which needs commit.
...
...
@@ -469,7 +475,7 @@ class SubProject(models.Model):
translation
.
commit_pending
()
# Process linked projects
for
sp
in
SubProject
.
objects
.
filter
(
repo
=
'weblate://%s/%s'
%
(
self
.
project
.
slug
,
self
.
slug
)
):
for
sp
in
self
.
get_linked_childs
(
):
for
translation
in
sp
.
translation_set
.
all
():
translation
.
commit_pending
()
...
...
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