mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #15695: Clear any legacy group permission associations during migration
This commit is contained in:
@ -63,6 +63,11 @@ class Migration(migrations.Migration):
|
||||
field=models.ManyToManyField(blank=True, related_name='object_permissions', to='users.group'),
|
||||
),
|
||||
|
||||
# Delete any lingering group assignments for legacy permissions (from before NetBox v2.9)
|
||||
migrations.RunSQL(
|
||||
"DELETE from auth_group_permissions"
|
||||
),
|
||||
|
||||
# Delete groups from the old table
|
||||
migrations.RunSQL(
|
||||
"DELETE from auth_group"
|
||||
|
Reference in New Issue
Block a user