When an admin views a renewal request for an allowance type that does not have a renewal survey (e.g., ICA), the approval page logs an exception and shows an error banner:
ValueError: Failed to load survey data for AllocationPeriod 'Fall Semester 2026'
from /etc/coldfront/config/renewal-survey-data.json.
logger: coldfront.core.project.views_.renewal_views.approval_views
Root cause
AllocationRenewalRequestDetailView.get_context_data calls get_renewal_survey_response for every renewal request whenever RENEWAL_SURVEY_ENABLED is true. The renewal survey is only meaningful for FCA (BRC) and PCA (LRC) renewals. ICA and any other allowance types not in the survey data will always produce a ValueError from the backend.
The except Exception block catches it but then calls logger.exception(e) (error-level log) and messages.error(...) (error banner shown to the admin) — neither is appropriate for an expected, non-error condition.
Broader context
The renewal flow is designed for FCA/PCA (AllocationRenewalMixin.__init__ hardcodes this with a TODO). Several behaviors — renewal survey requirement, allocation period naming, period filters — are implicitly FCA/PCA-specific. This issue is one symptom of that incomplete generalization.
Impact
- Spurious error banner shown to admins reviewing non-FCA/PCA renewal requests
- Noise in error logs for expected behavior
- Functionally harmless:
survey_response is set to None and the page renders
Fix
Guard the get_renewal_survey_response call in get_context_data on whether the request's computing allowance is renewal-survey-applicable, consistent with how the renewal wizard already restricts itself to FCA/PCA. The guard should use the same predicate (is_renewal_supported() or a new requires_renewal_survey()) so the condition is defined in one place.
When an admin views a renewal request for an allowance type that does not have a renewal survey (e.g., ICA), the approval page logs an exception and shows an error banner:
Root cause
AllocationRenewalRequestDetailView.get_context_datacallsget_renewal_survey_responsefor every renewal request wheneverRENEWAL_SURVEY_ENABLEDis true. The renewal survey is only meaningful for FCA (BRC) and PCA (LRC) renewals. ICA and any other allowance types not in the survey data will always produce aValueErrorfrom the backend.The
except Exceptionblock catches it but then callslogger.exception(e)(error-level log) andmessages.error(...)(error banner shown to the admin) — neither is appropriate for an expected, non-error condition.Broader context
The renewal flow is designed for FCA/PCA (
AllocationRenewalMixin.__init__hardcodes this with a TODO). Several behaviors — renewal survey requirement, allocation period naming, period filters — are implicitly FCA/PCA-specific. This issue is one symptom of that incomplete generalization.Impact
survey_responseis set toNoneand the page rendersFix
Guard the
get_renewal_survey_responsecall inget_context_dataon whether the request's computing allowance is renewal-survey-applicable, consistent with how the renewal wizard already restricts itself to FCA/PCA. The guard should use the same predicate (is_renewal_supported()or a newrequires_renewal_survey()) so the condition is defined in one place.