Skip to content

Commit

Permalink
Fixes #15695: Clear any legacy group permission associations during m…
Browse files Browse the repository at this point in the history
…igration
  • Loading branch information
jeremystretch committed Apr 16, 2024
1 parent 4562e34 commit 2a88768
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions netbox/users/migrations/0006_custom_group_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 2a88768

Please sign in to comment.