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
05d83002
Commit
05d83002
authored
Mar 03, 2016
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
e70c7221
b369c30f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
weblate/trans/migrations/0059_auto_20160303_0934.py
weblate/trans/migrations/0059_auto_20160303_0934.py
+9
-2
No files found.
weblate/trans/migrations/0059_auto_20160303_0934.py
View file @
05d83002
...
...
@@ -9,15 +9,22 @@ def fill_in_subscriptions(apps, schema_editor):
"""Adds subscriptions to owners or ACL enabled users"""
Project
=
apps
.
get_model
(
'trans'
,
'Project'
)
Group
=
apps
.
get_model
(
'auth'
,
'Group'
)
Profile
=
apps
.
get_model
(
'accounts'
,
'Profile'
)
for
project
in
Project
.
objects
.
all
():
for
owner
in
project
.
owners
.
all
():
try
:
owner
.
profile
.
subscriptions
.
add
(
project
)
except
Profile
.
DoesNotExist
:
pass
if
project
.
enable_acl
:
group
=
Group
.
objects
.
get
(
name
=
project
.
name
)
for
user
in
group
.
user_set
.
all
():
try
:
user
.
profile
.
subscriptions
.
add
(
project
)
except
Profile
.
DoesNotExist
:
pass
class
Migration
(
migrations
.
Migration
):
...
...
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