Enabling export of applications through awxkit (#11887)

This commit is contained in:
John Westcott IV 2022-03-10 13:49:18 -05:00 committed by GitHub
parent 4de27117e8
commit bc783b8f94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 0 deletions

View File

@ -1263,6 +1263,12 @@ class OAuth2ApplicationSerializer(BaseSerializer):
activity_stream=self.reverse('api:o_auth2_application_activity_stream_list', kwargs={'pk': obj.pk}),
)
)
if obj.organization_id:
res.update(
dict(
organization=self.reverse('api:organization_detail', kwargs={'pk': obj.organization_id}),
)
)
return res
def get_modified(self, obj):

View File

@ -25,6 +25,7 @@ EXPORTABLE_RESOURCES = [
'job_templates',
'workflow_job_templates',
'execution_environments',
'applications',
]

View File

@ -10,6 +10,7 @@ from . import base
class OAuth2Application(HasCreate, base.Base):
dependencies = [Organization]
NATURAL_KEY = ('organization', 'name')
def payload(self, **kwargs):
payload = PseudoNamespace(