refactor of create_unified_job in connection with new copy endpoint development

This commit is contained in:
AlanCoding
2016-11-20 19:47:15 -05:00
parent a39af2a7fd
commit 8cd4ba0175
12 changed files with 106 additions and 111 deletions

View File

@@ -633,14 +633,6 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin):
content = super(Job, self)._result_stdout_raw(*args, **kwargs)
return self._survey_search_and_replace(content)
def copy(self):
presets = {}
for kw in JobTemplate._get_unified_job_field_names():
presets[kw] = getattr(self, kw)
if not self.job_template:
self.job_template = JobTemplate(name='temporary')
return self.job_template.create_unified_job(**presets)
# Job Credential required
@property
def can_start(self):