Conditionally return total_results from list resources.
Review Request #13274 — Created Sept. 15, 2023 and submitted — Latest diff uploaded
We have some resources that behave like lists but don't contain a
total_resultsfield. When we access this, we crash, because we assume
this will always be present.This change makes that field optional, setting it to
Noneif not
found.
Unit tests pass.
Tested this with the watched review request resource, which exhibits
this failure.