program is not provided

This commit is contained in:
bkfox 2022-03-22 12:48:46 +01:00
parent 81dc3a385c
commit d29f89758b
10 changed files with 2 additions and 1 deletions

View File

@ -82,6 +82,7 @@ class SoundFile:
return sound
# FIXME: sound.program as not null
if program is None:
program = kwargs['program'] = Program.get_from_path(self.path)
sound, created = Sound.objects.get_or_create(file=self.sound_path, defaults=kwargs) \
if not sound else (sound, False)