DDMAL / CantusDB

A new site for Cantus Database running under Django.
https://cantusdatabase.org
MIT License
5 stars 6 forks source link

Fix `TypeError` in `get_suggested_chant()` #1517

Closed lucasmarchd01 closed 1 month ago

lucasmarchd01 commented 1 month ago

This PR adds a try/except block inside the get_suggested_chant function.

Sometimes, the json-cid endpoint path will return a json response where the info key is None, causing a 500 error on the chant create page for certain CantusIDs.

Here, we return None if a TypeError exception is caught.

Will add more robust error handling for issue #1515, but we will leave the issue open until further checks are made on Cantus Index

lucasmarchd01 commented 1 month ago

Yup, I just read more of the discussion that I missed so we can leave the issue open for now!