Fix /analysis/None being generated in hypothesis pages when a hypothesis has a NULL analysis_id in the database.
Two issues:
h.get('analysis_id', '') returns None (not '') when the key exists in the dict but value is None — Python dict.get() only uses the default when key is missing/analysis/NoneMain api.py already had a fix using source_analysis_url variable:
analysis_id = (h.get("analysis_id") or "").strip()
source_analysis_url = f"/analysis/{html.escape(analysis_id)}" if analysis_id else ""But the page cache still served old HTML with /analysis/None. Cleared hypothesis page cache.
DELETE FROM page_cache WHERE cache_key LIKE 'hypothesis:%'