What happened?
The core recommendation endpoint POST /api/recommend crashes with a
NameError on every request.
Expected: submitting the recommendation form returns matching projects.
Actual: the server throws a NameError and the user gets no results.
Root cause: validate_recommendation_inputs() in utils/recommender.py
references VALID_INTERESTS on line 229, but this constant is never
defined anywhere in the codebase. VALID_LEVELS and VALID_TIME_AVAILABILITY
are defined correctly right above it (lines 212–213), but VALID_INTERESTS
was simply never added.
Steps to reproduce
- Clone the repo and run the dev server: python app.py
- Open http://127.0.0.1:5000
- Enter any skill (e.g. "Python"), select Beginner / Web / Low
- Click "Get Recommendations"
- Server returns a 500 error
Expected behaviour
The function should validate the interest field against a list of allowed
values (the same way it validates level and time_availability) and return
an empty list [] when inputs are valid.
Area of the app affected
Recommendation results
Python version
3.13.12
Operating system
Windows 11
Relevant error output or logs
Before submitting
What happened?
The core recommendation endpoint POST /api/recommend crashes with a
NameError on every request.
Expected: submitting the recommendation form returns matching projects.
Actual: the server throws a NameError and the user gets no results.
Root cause: validate_recommendation_inputs() in utils/recommender.py
references VALID_INTERESTS on line 229, but this constant is never
defined anywhere in the codebase. VALID_LEVELS and VALID_TIME_AVAILABILITY
are defined correctly right above it (lines 212–213), but VALID_INTERESTS
was simply never added.
Steps to reproduce
Expected behaviour
The function should validate the interest field against a list of allowed
values (the same way it validates level and time_availability) and return
an empty list [] when inputs are valid.
Area of the app affected
Recommendation results
Python version
3.13.12
Operating system
Windows 11
Relevant error output or logs
Before submitting