mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 14:05:59 -03:30
Merge pull request #4140 from ansible/AlanCoding-patch-1
Fix scan job relaunch bug
This commit is contained in:
@@ -675,7 +675,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
|
|||||||
|
|
||||||
fields = unified_jt_class._get_unified_job_field_names() + [parent_field_name]
|
fields = unified_jt_class._get_unified_job_field_names() + [parent_field_name]
|
||||||
unified_job = copy_model_by_class(self, unified_job_class, fields, {})
|
unified_job = copy_model_by_class(self, unified_job_class, fields, {})
|
||||||
unified_job.job_type = 'relaunch'
|
unified_job.launch_type = 'relaunch'
|
||||||
unified_job.save()
|
unified_job.save()
|
||||||
|
|
||||||
# Labels coppied here
|
# Labels coppied here
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ def test_orphan_unified_job_creation(instance, inventory):
|
|||||||
assert job2.job_template is None
|
assert job2.job_template is None
|
||||||
assert job2.inventory == inventory
|
assert job2.inventory == inventory
|
||||||
assert job2.name == 'hi world'
|
assert job2.name == 'hi world'
|
||||||
|
assert job.job_type == job2.job_type
|
||||||
|
assert job2.launch_type == 'relaunch'
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.django_db
|
@pytest.mark.django_db
|
||||||
|
|||||||
Reference in New Issue
Block a user