Update Job Blueprint package

This commit is contained in:
Patrick Jentsch
2024-12-12 15:26:01 +01:00
parent bb60a2ba67
commit 0d1805fb76
9 changed files with 92 additions and 98 deletions

View File

@ -20,14 +20,6 @@ class JobInput(FileMixin, HashidMixin, db.Model):
def __repr__(self):
return f'<JobInput {self.filename}>'
@property
def content_url(self):
return url_for(
'jobs.download_job_input',
job_id=self.job.id,
job_input_id=self.id
)
@property
def jsonpatch_path(self):
return f'{self.job.jsonpatch_path}/inputs/{self.hashid}'
@ -40,7 +32,7 @@ class JobInput(FileMixin, HashidMixin, db.Model):
def url(self):
return url_for(
'jobs.job',
job_id=self.job_id,
job_input_id=self.id,
_anchor=f'job-{self.job.hashid}-input-{self.hashid}'
)

View File

@ -22,14 +22,6 @@ class JobResult(FileMixin, HashidMixin, db.Model):
def __repr__(self):
return f'<JobResult {self.filename}>'
@property
def download_url(self):
return url_for(
'jobs.download_job_result',
job_id=self.job_id,
job_result_id=self.id
)
@property
def jsonpatch_path(self):
return f'{self.job.jsonpatch_path}/results/{self.hashid}'
@ -41,8 +33,8 @@ class JobResult(FileMixin, HashidMixin, db.Model):
@property
def url(self):
return url_for(
'jobs.job',
job_id=self.job_id,
'job_results.job_result',
job_result_id=self.id,
_anchor=f'job-{self.job.hashid}-result-{self.hashid}'
)