Feat : More departments added#491
Conversation
Signed-off-by: chetisha28 <chetishagemini28@gmail.com>
|
@chetisha28 is attempting to deploy a commit to the 007's projects Team on Vercel. A member of the Team first needs to authorize it. |
Thanks for creating a PR for your Issue!
|
| <option value="AI">AI</option> | ||
| <option value="ECE">ECE</option> | ||
| <option value="EE">EE</option> | ||
| <option value="CIVIL">CIVIL</option> | ||
| <option value="CHEMICAL">CHEMICAL</option> |
There was a problem hiding this comment.
Add AI, EE, and CHEMICAL to
default_departments in app.py
The admin /admin/departments page counts students via LEFT JOIN student s ON d.dept_code = s.student_dept (app.py:1043), so only dept codes present in the departments table are counted. default_departments (app.py:217–223) includes CIVIL but not AI, EE, or CHEMICAL — students registering with those three departments will be silently invisible in admin department statistics.
Prompt to fix with AI
Copy this prompt into your AI coding assistant to fix this issue.
In `app.py`, around line 217, the `default_departments` list is missing three department codes that were just added to the registration form in `templates/student_new_2.html`. Add the following tuples to the `default_departments` list:
("AI", "Artificial Intelligence"),
("EE", "Electrical Engineering"),
("CHEMICAL", "Chemical Engineering"),
Without these entries, the admin departments statistics page (`/admin/departments`) will silently exclude all students who register with AI, EE, or CHEMICAL because it uses a LEFT JOIN from the `departments` table (keyed on `dept_code`) to the `student` table.
Confidence Score: 3/5 - Review RecommendedNot safe to merge without review — this PR adds new departments (AI, EE, CHEMICAL) to Key Findings:
Files requiring special attention
|
EntelligenceAI PR SummaryThis PR expands department coverage in both the database seed data and the student registration form.
Confidence Score: 5/5 - Safe to MergeSafe to merge — this PR makes straightforward, additive changes to department seed data and HTML form options with no logic modifications, deletions, or risk surface introduced. The additions to Key Findings:
|
Which issue does this PR close?
What changes are included in this PR?
This PR only adds a few more department options for the user to select.
Are these changes tested?
Yes these changes are tested and only a single file is changed. no unnecessary changes are made.