laws-africa / peachjam

Project Peach Jam
https://agp.africanlii.org
GNU General Public License v3.0
2 stars 0 forks source link

ValueError: No configuration for prefix BONIFACE DAVID KANGOLI v. THE ZANZIBAR COLLECTION M in settings.DYNAM... #1854

Closed sentry-io[bot] closed 1 week ago

sentry-io[bot] commented 4 weeks ago

Sentry Issue: LII-1ND

ValueError: No configuration for prefix BONIFACE DAVID KANGOLI v. THE ZANZIBAR COLLECTION M in settings.DYNAMIC_STORAGE['PREFIXES']
(15 additional frame(s) were not displayed)
...
  File "peachjam/forms.py", line 38, in _save_m2m
    self.process_upload_file(self.cleaned_data["upload_file"])
  File "peachjam/forms.py", line 44, in process_upload_file
    SourceFile(
  File "peachjam/models/core_document_model.py", line 722, in save
    self.size = self.file.size
  File "peachjam/storage.py", line 72, in __init__
    self.storage = field.get_storage(instance, name)
  File "peachjam/storage.py", line 44, in get_dynamic_storage
    raise ValueError(
actlikewill commented 1 week ago

@longhotsummer this is reproducible by uploading a file with a colon in the title. I'm not entirely sure how best to handle it.

longhotsummer commented 1 week ago

we clean other attachments, but not upload_file in the new documents view - fixed here: https://github.com/laws-africa/peachjam/pull/1899