Merge pull request #4140 from ansible/AlanCoding-patch-1

Fix scan job relaunch bug
This commit is contained in:
Alan Rominger 2016-11-29 08:52:01 -05:00 committed by GitHub
commit 25eaae5f09
2 changed files with 3 additions and 1 deletions

View File

@ -675,7 +675,7 @@ class UnifiedJob(PolymorphicModel, PasswordFieldsModel, CommonModelNameNotUnique
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.job_type = 'relaunch'
unified_job.launch_type = 'relaunch'
unified_job.save()
# Labels coppied here

View File

@ -10,6 +10,8 @@ def test_orphan_unified_job_creation(instance, inventory):
assert job2.job_template is None
assert job2.inventory == inventory
assert job2.name == 'hi world'
assert job.job_type == job2.job_type
assert job2.launch_type == 'relaunch'
@pytest.mark.django_db