mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Merge pull request #1659 from chrismeyersfsu/fix-labels_unified
labels on unified jobs
This commit is contained in:
27
awx/main/migrations/0020_v300_labels_changes.py
Normal file
27
awx/main/migrations/0020_v300_labels_changes.py
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('main', '0019_v300_new_azure_credential'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='job',
|
||||||
|
name='labels',
|
||||||
|
),
|
||||||
|
migrations.RemoveField(
|
||||||
|
model_name='jobtemplate',
|
||||||
|
name='labels',
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='unifiedjob',
|
||||||
|
name='labels',
|
||||||
|
field=models.ManyToManyField(related_name='unifiedjob_labels', to='main.Label', blank=True),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -135,11 +135,6 @@ class JobOptions(BaseModel):
|
|||||||
become_enabled = models.BooleanField(
|
become_enabled = models.BooleanField(
|
||||||
default=False,
|
default=False,
|
||||||
)
|
)
|
||||||
labels = models.ManyToManyField(
|
|
||||||
"Label",
|
|
||||||
blank=True,
|
|
||||||
related_name='%(class)s_labels'
|
|
||||||
)
|
|
||||||
|
|
||||||
extra_vars_dict = VarsDictProperty('extra_vars', True)
|
extra_vars_dict = VarsDictProperty('extra_vars', True)
|
||||||
|
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ class UnifiedJobTemplate(PolymorphicModel, CommonModelNameNotUnique, Notificatio
|
|||||||
default='ok',
|
default='ok',
|
||||||
editable=False,
|
editable=False,
|
||||||
)
|
)
|
||||||
|
labels = models.ManyToManyField(
|
||||||
|
"Label",
|
||||||
|
blank=True,
|
||||||
|
related_name='%(class)s_labels'
|
||||||
|
)
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
real_instance = self.get_real_instance()
|
real_instance = self.get_real_instance()
|
||||||
@@ -476,6 +481,12 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
|||||||
default='',
|
default='',
|
||||||
editable=False,
|
editable=False,
|
||||||
)
|
)
|
||||||
|
labels = models.ManyToManyField(
|
||||||
|
"Label",
|
||||||
|
blank=True,
|
||||||
|
related_name='%(class)s_labels'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_absolute_url(self):
|
def get_absolute_url(self):
|
||||||
real_instance = self.get_real_instance()
|
real_instance = self.get_real_instance()
|
||||||
|
|||||||
Reference in New Issue
Block a user