freelawproject / courtlistener

A fully-searchable and accessible archive of court data including growing repositories of opinions, oral arguments, judges, judicial financial records, and federal filings.
https://www.courtlistener.com
Other
552 stars 151 forks source link

AttributeError: 'list' object has no attribute 'to_dict' #4620

Open sentry-io[bot] opened 1 month ago

sentry-io[bot] commented 1 month ago

It seems our code is having trouble processing the query { type: "r" }. This might be because the query doesn't include any filters.


Sentry Issue: COURTLISTENER-8EM

AttributeError: 'list' object has no attribute 'to_dict'
  File "cl/alerts/tasks.py", line 995, in es_save_alert_document
    "percolator_query": document.prepare_percolator_query(alert),
  File "cl/search/documents.py", line 2001, in prepare_percolator_query
    return query.to_dict()

Filed by @Erosendo