laws-africa / peachjam

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

AttributeError: 'NoneType' object has no attribute 'rstrip' #1860

Closed sentry-io[bot] closed 3 weeks ago

sentry-io[bot] commented 4 weeks ago

Sentry Issue: LII-1N4

Work.DoesNotExist: Work matching query does not exist.
  File "django/db/models/query.py", line 581, in get_or_create
    return self.get(**kwargs), False
  File "django/db/models/query.py", line 435, in get
    raise self.model.DoesNotExist(

AttributeError: 'NoneType' object has no attribute 'rstrip'
(6 additional frame(s) were not displayed)
...
  File "kenyalaw/adapters.py", line 186, in update_document
    self.get_case_history(document["case_history"], created_doc)
  File "kenyalaw/adapters.py", line 314, in get_case_history
    history.historical_judgment_work, new = Work.objects.get_or_create(