mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 21:51:26 -03:30
Merged label migrations; Active flag removal on new label system
This commit is contained in:
parent
3b233f828e
commit
af0b5b42c0
@ -2222,7 +2222,7 @@ class LabelSerializer(BaseSerializer):
|
||||
|
||||
def get_related(self, obj):
|
||||
res = super(LabelSerializer, self).get_related(obj)
|
||||
if obj.organization and obj.organization.active:
|
||||
if obj.organization:
|
||||
res['organization'] = reverse('api:organization_detail', args=(obj.organization.pk,))
|
||||
return res
|
||||
|
||||
|
||||
@ -1210,7 +1210,7 @@ class LabelAccess(BaseAccess):
|
||||
model = Label
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects.filter(active=True).distinct()
|
||||
qs = self.model.objects.distinct()
|
||||
if self.user.is_superuser:
|
||||
return qs
|
||||
return qs
|
||||
|
||||
@ -12,7 +12,7 @@ class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
('taggit', '0002_auto_20150616_2121'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('main', '0007_v300_credential_domain_field'),
|
||||
('main', '0010_v300_credential_domain_field'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@ -23,7 +23,6 @@ class Migration(migrations.Migration):
|
||||
('created', models.DateTimeField(default=None, editable=False)),
|
||||
('modified', models.DateTimeField(default=None, editable=False)),
|
||||
('description', models.TextField(default=b'', blank=True)),
|
||||
('active', models.BooleanField(default=True, editable=False)),
|
||||
('name', models.CharField(max_length=512)),
|
||||
('created_by', models.ForeignKey(related_name="{u'class': 'label', u'app_label': 'main'}(class)s_created+", on_delete=django.db.models.deletion.SET_NULL, default=None, editable=False, to=settings.AUTH_USER_MODEL, null=True)),
|
||||
('modified_by', models.ForeignKey(related_name="{u'class': 'label', u'app_label': 'main'}(class)s_modified+", on_delete=django.db.models.deletion.SET_NULL, default=None, editable=False, to=settings.AUTH_USER_MODEL, null=True)),
|
||||
Loading…
x
Reference in New Issue
Block a user