mirror of
https://github.com/ansible/awx.git
synced 2026-03-06 03:01:06 -03:30
Merge pull request #9569 from jbradberry/further-fix-for-ee-deletion
Undo the polymorphic.SET_NULL for Organization Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
19
awx/main/migrations/0131_undo_org_polymorphic_ee.py
Normal file
19
awx/main/migrations/0131_undo_org_polymorphic_ee.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 2.2.16 on 2021-03-11 20:50
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('main', '0130_ee_polymorphic_set_null'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='organization',
|
||||||
|
name='default_environment',
|
||||||
|
field=models.ForeignKey(blank=True, default=None, help_text='The default execution environment for jobs run by this organization.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to='main.ExecutionEnvironment'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -27,7 +27,6 @@ from awx.main.models.rbac import (
|
|||||||
)
|
)
|
||||||
from awx.main.models.unified_jobs import UnifiedJob
|
from awx.main.models.unified_jobs import UnifiedJob
|
||||||
from awx.main.models.mixins import ResourceMixin, CustomVirtualEnvMixin, RelatedJobsMixin
|
from awx.main.models.mixins import ResourceMixin, CustomVirtualEnvMixin, RelatedJobsMixin
|
||||||
from awx.main.utils import polymorphic
|
|
||||||
|
|
||||||
__all__ = ['Organization', 'Team', 'Profile', 'UserSessionMembership']
|
__all__ = ['Organization', 'Team', 'Profile', 'UserSessionMembership']
|
||||||
|
|
||||||
@@ -67,7 +66,7 @@ class Organization(CommonModel, NotificationFieldsModel, ResourceMixin, CustomVi
|
|||||||
null=True,
|
null=True,
|
||||||
blank=True,
|
blank=True,
|
||||||
default=None,
|
default=None,
|
||||||
on_delete=polymorphic.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
related_name='+',
|
related_name='+',
|
||||||
help_text=_('The default execution environment for jobs run by this organization.'),
|
help_text=_('The default execution environment for jobs run by this organization.'),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user