mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2025-06-21 05:20:36 +00:00
Use pathlib where possible
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
from flask import url_for
|
||||
from flask_hashids import HashidMixin
|
||||
import os
|
||||
from pathlib import Path
|
||||
from app import db
|
||||
from .file_mixin import FileMixin
|
||||
|
||||
@ -35,8 +35,8 @@ class JobResult(FileMixin, HashidMixin, db.Model):
|
||||
return f'{self.job.jsonpatch_path}/results/{self.hashid}'
|
||||
|
||||
@property
|
||||
def path(self):
|
||||
return os.path.join(self.job.path, 'results', str(self.id))
|
||||
def path(self) -> Path:
|
||||
return self.job.path / 'results' / f'{self.id}'
|
||||
|
||||
@property
|
||||
def url(self):
|
||||
|
Reference in New Issue
Block a user