portico: Fix incorrect fallback contributors data type.

Previously, using this without having run fetch-contributors-data
would throw an exception trying to call .filter on an empty
dictionary.
This commit is contained in:
Tim Abbott 2023-03-22 15:16:28 -07:00
parent eb572e525a
commit 50b91fe5c7
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ def team_view(request: HttpRequest) -> HttpResponse:
with open(settings.CONTRIBUTOR_DATA_FILE_PATH, "rb") as f: with open(settings.CONTRIBUTOR_DATA_FILE_PATH, "rb") as f:
data = orjson.loads(f.read()) data = orjson.loads(f.read())
except FileNotFoundError: except FileNotFoundError:
data = {"contributors": {}, "date": "Never ran."} data = {"contributors": [], "date": "Never ran."}
return TemplateResponse( return TemplateResponse(
request, request,