Commit f4bc1b14 authored by Sli's avatar Sli

Fix is_active migration

parent 12c49b28
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment