Merge pull request #618 from tcely/media-directory_path

Simplify directory_path for Media
This commit is contained in:
meeb 2025-01-15 01:17:25 +11:00 committed by GitHub
commit 9dcc2294e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1263,8 +1263,7 @@ class Media(models.Model):
@property @property
def directory_path(self): def directory_path(self):
dirname = self.source.directory_path / self.filename return self.filepath.parent
return dirname.parent
@property @property
def filepath(self): def filepath(self):