Skip to content

Commit a335ab2

Browse files
committed
Fix pending trigger events error
1 parent 31821cb commit a335ab2

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

ansible_base/rbac/migrations/0004_remote_permissions_additions.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,4 +175,15 @@ class Migration(migrations.Migration):
175175
name='api_slug',
176176
field=models.CharField(default='', help_text='String to use for references to this type from other models in the API.', max_length=201),
177177
),
178+
# Make the content_type fields nullable so the reverse migrations are possible
179+
migrations.AlterField(
180+
model_name='dabpermission',
181+
name='content_type',
182+
field=models.ForeignKey(help_text='The content type this permission will apply to.', null=True, on_delete=models.deletion.CASCADE, to='contenttypes.contenttype', verbose_name='content type'),
183+
),
184+
migrations.AlterField(
185+
model_name='objectrole',
186+
name='content_type',
187+
field=models.ForeignKey(help_text='The content type of the subject of permission assignments. Duplicated from related RoleDefinition.', null=True, on_delete=models.deletion.CASCADE, to='contenttypes.contenttype'),
188+
),
178189
]

ansible_base/rbac/migrations/0005_remote_permissions_data.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Django 4.2.23 on 2025-06-30 12:48
22

3-
from django.db import migrations, models
3+
from django.db import migrations
44

55

66
def create_types_if_needed(apps, schema_editor):
@@ -54,15 +54,4 @@ class Migration(migrations.Migration):
5454
operations = [
5555
migrations.RunPython(create_types_if_needed, migrations.RunPython.noop),
5656
migrations.RunPython(migrate_content_type, migrations.RunPython.noop),
57-
# Make the content_type fields nullable so the reverse migrations are possible
58-
migrations.AlterField(
59-
model_name='dabpermission',
60-
name='content_type',
61-
field=models.ForeignKey(help_text='The content type this permission will apply to.', null=True, on_delete=models.deletion.CASCADE, to='contenttypes.contenttype', verbose_name='content type'),
62-
),
63-
migrations.AlterField(
64-
model_name='objectrole',
65-
name='content_type',
66-
field=models.ForeignKey(help_text='The content type of the subject of permission assignments. Duplicated from related RoleDefinition.', null=True, on_delete=models.deletion.CASCADE, to='contenttypes.contenttype'),
67-
),
6857
]

0 commit comments

Comments
 (0)