Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove github fetch dependency on Grant page #1096

Open
michaelwood opened this issue Aug 15, 2024 · 0 comments
Open

Remove github fetch dependency on Grant page #1096

michaelwood opened this issue Aug 15, 2024 · 0 comments

Comments

@michaelwood
Copy link
Member

It appears we fetch the 360Giving schema on loading the grant page in order to flatten the data into a table. This isn't particularly efficient and creates a dependency on being able to fetch that file from github. This could be fixed by either downloading a copy for the first load or not using the schema file.

HTTPError: 500 Server Error: Internal Server Error for url: https://raw.githubusercontent.com/ThreeSixtyGiving/standard/master/schema/360-giving-schema.json
(23 additional frame(s) were not displayed)
...
  File "grantnav/frontend/views.py", line 1262, in org
    return render(request, "org.html", context=context)
  File "grantnav/frontend/templatetags/frontend.py", line 76, in flatten
    return sorted([(key, value) for key, value in flatten_dict(d)
  File "grantnav/frontend/templatetags/frontend.py", line 76, in <listcomp>
    return sorted([(key, value) for key, value in flatten_dict(d)
  File "grantnav/frontend/templatetags/frontend.py", line 37, in flatten_dict
    schema = jsonref.load_uri(settings.GRANT_SCHEMA)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant