This commit is contained in:
bkfox
2022-03-20 12:24:11 +01:00
parent 65a6c9f90c
commit fd7b504d01
6 changed files with 7 additions and 7 deletions

View File

@ -100,7 +100,7 @@ class Sound(models.Model):
def _upload_to(self, filename):
subdir = AIRCOX_SOUND_ARCHIVES_SUBDIR if self.type == self.TYPE_ARCHIVE else \
AIRCOX_SOUND_EXCERPTS_SUBDIR
return os.path.join(o.program.path, subdir, filename)
return os.path.join(self.program.path, subdir, filename)
file = models.FileField(
_('file'), upload_to=_upload_to