Fixed migration, removed Corporate groups

This commit is contained in:
2010-10-21 16:51:57 +01:00
parent aa2d00c820
commit 361ff00187
3 changed files with 8 additions and 7 deletions

View File

@@ -7,8 +7,11 @@ from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
for group in orm.Group.objects.all():
obj = orm.GroupInformation(group=group)
for group in orm['auth.Group'].objects.all():
try:
obj = orm.GroupInformation.objects.get(group=group)
except orm['auth.Group'].DoesNotExist:
obj = orm.GroupInformation(group=group)
obj.save()
def backwards(self, orm):