Skip to content

Commit

Permalink
Merge pull request #9569 from jbradberry/further-fix-for-ee-deletion
Browse files Browse the repository at this point in the history
Undo the polymorphic.SET_NULL for Organization

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
  • Loading branch information
softwarefactory-project-zuul[bot] committed Mar 11, 2021
2 parents 52a46dd + 5bec4a5 commit 8298b76
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
19 changes: 19 additions & 0 deletions awx/main/migrations/0131_undo_org_polymorphic_ee.py
Original file line number Diff line number Diff line change
@@ -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'),
),
]
3 changes: 1 addition & 2 deletions awx/main/models/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
)
from awx.main.models.unified_jobs import UnifiedJob
from awx.main.models.mixins import ResourceMixin, CustomVirtualEnvMixin, RelatedJobsMixin
from awx.main.utils import polymorphic

__all__ = ['Organization', 'Team', 'Profile', 'UserSessionMembership']

Expand Down Expand Up @@ -67,7 +66,7 @@ class Meta:
null=True,
blank=True,
default=None,
on_delete=polymorphic.SET_NULL,
on_delete=models.SET_NULL,
related_name='+',
help_text=_('The default execution environment for jobs run by this organization.'),
)
Expand Down

0 comments on commit 8298b76

Please sign in to comment.