Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Sith
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
59
Issues
59
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AE
Sith
Commits
f4bc1b14
Verified
Commit
f4bc1b14
authored
Sep 17, 2017
by
Sli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix is_active migration
parent
12c49b28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
migrate.py
migrate.py
+5
-2
No files found.
migrate.py
View file @
f4bc1b14
...
...
@@ -1379,10 +1379,13 @@ def migrate_club_again():
cur
=
db
.
cursor
(
MySQLdb
.
cursors
.
SSDictCursor
)
cur
.
execute
(
"SELECT * FROM asso"
)
print
(
"Migrating club is_active"
)
for
club
in
cur
:
try
:
c
=
Club
.
objects
.
get
(
id
=
club
[
'id_asso'
])
c
.
is_disabled
=
club
[
'hidden'
]
==
1
c
=
Club
.
objects
.
get
(
unix_name
=
club
[
'nom_unix_asso'
])
c
.
is_active
=
club
[
'hidden'
]
==
0
c
.
save
()
except
:
pass
...
...
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