mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 01:17:37 -02:30
Fixing final CI error
This commit is contained in:
committed by
John Westcott IV
parent
c3045b1169
commit
2cee1caad2
@@ -2,9 +2,6 @@
|
|||||||
# Python
|
# Python
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
# Psycopg2
|
|
||||||
from psycopg import sql
|
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
from django.db import connection, migrations, models, OperationalError, ProgrammingError
|
from django.db import connection, migrations, models, OperationalError, ProgrammingError
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
@@ -136,12 +133,8 @@ class Migration(migrations.Migration):
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
migrations.RunSQL(
|
migrations.RunSQL(
|
||||||
[
|
sql="CREATE INDEX host_ansible_facts_default_gin ON {} USING gin(ansible_facts jsonb_path_ops);".format(Host._meta.db_table),
|
||||||
"CREATE INDEX host_ansible_facts_default_gin ON {} USING gin(ansible_facts jsonb_path_ops);".format(
|
reverse_sql='DROP INDEX host_ansible_facts_default_gin;',
|
||||||
sql.Identifier(Host._meta.db_table).as_string(connection.cursor())
|
|
||||||
)
|
|
||||||
],
|
|
||||||
[('DROP INDEX host_ansible_facts_default_gin;', None)],
|
|
||||||
),
|
),
|
||||||
# SCM file-based inventories
|
# SCM file-based inventories
|
||||||
migrations.AddField(
|
migrations.AddField(
|
||||||
|
|||||||
@@ -195,6 +195,9 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
|||||||
|
|
||||||
@cached_property
|
@cached_property
|
||||||
def dynamic_input_fields(self):
|
def dynamic_input_fields(self):
|
||||||
|
# if the credential is not yet saved we can't access the input_sources
|
||||||
|
if not self.id:
|
||||||
|
return []
|
||||||
return [obj.input_field_name for obj in self.input_sources.all()]
|
return [obj.input_field_name for obj in self.input_sources.all()]
|
||||||
|
|
||||||
def _password_field_allows_ask(self, field):
|
def _password_field_allows_ask(self, field):
|
||||||
|
|||||||
Reference in New Issue
Block a user