mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-18 12:19:29 +00:00
Fixed migration, removed Corporate groups
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user