You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are a small number of sounds uploaded with a null value for base_filename_slug
In [9]: forsinmodels.Sound.objects.filter(base_filename_slug__isnull=True).order_by('id'):
...: print(s.id, s.created, s.user)
There are sounds from 2022, 2023, and 2024 so this doesn't appear to be a one-off. This value is used in the sound's __str__, which causes issues in the admin.
The value is set in sound_upload.create_sound(). This method is a bit complex because the value requires the sound to be first saved (to get the id) and then it's updated. It could be that a sound upload failed part-way through, or we have a different flow of creating sounds too.
Importantly, I see that sounds.views.sound_download() uses a different method to get the filename, Sound.friendly_filename(). Even though the documentation for base_filename_slug says that it's used for the download name, but this doesn't seem to be the case. Maybe it's not actually needed.
Options:
see if we can work out if there is a different way that sounds are created in some cases
see if there is a bug/crash when creating some sounds
remove this field and use Sound.friendly_filename()
The text was updated successfully, but these errors were encountered:
https://logserver.mtg.upf.edu/organizations/sentry/issues/3695/?
There are a small number of sounds uploaded with a null value for
base_filename_slug
There are sounds from 2022, 2023, and 2024 so this doesn't appear to be a one-off. This value is used in the sound's
__str__
, which causes issues in the admin.The value is set in
sound_upload.create_sound()
. This method is a bit complex because the value requires the sound to be first saved (to get the id) and then it's updated. It could be that a sound upload failed part-way through, or we have a different flow of creating sounds too.Importantly, I see that
sounds.views.sound_download()
uses a different method to get the filename,Sound.friendly_filename()
. Even though the documentation for base_filename_slug says that it's used for the download name, but this doesn't seem to be the case. Maybe it's not actually needed.Options:
Sound.friendly_filename()
The text was updated successfully, but these errors were encountered: