Merge pull request #579 from tcely/patch-4

Simplify directory_path
This commit is contained in:
meeb authored and GitHub committed 2024-12-12 00:07:41 +11:00
commit 679f77b6b4
1 file changed
+1 -4
+1 -4
View File
@@ -1302,10 +1302,7 @@ class Media(models.Model):
@property
def directory_path(self):
# Otherwise, create a suitable filename from the source media_format
media_format = str(self.source.media_format)
media_details = self.format_dict
dirname = self.source.directory_path / media_format.format(**media_details)
dirname = self.source.directory_path / self.filename
return os.path.dirname(str(dirname))
@property