Skip to content

Chore/clean internship admin#228

Merged
Joshkovu merged 2 commits into
mainfrom
chore/clean-internshipAdmin
May 1, 2026
Merged

Chore/clean internship admin#228
Joshkovu merged 2 commits into
mainfrom
chore/clean-internshipAdmin

Conversation

@Joshkovu
Copy link
Copy Markdown
Owner

@Joshkovu Joshkovu commented May 1, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 1, 2026 08:37
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Free

Run ID: f7afa1d3-867b-42cb-b194-97054b5ed1f9

📥 Commits

Reviewing files that changed from the base of the PR and between ed97f97 and bde9e4a.

📒 Files selected for processing (3)
  • logify-backend/apps/evaluations/migrations/0005_evaluations_college_finalresults_college.py
  • logify-backend/apps/evaluations/models.py
  • logify-backend/apps/evaluations/views.py

Summary by CodeRabbit

  • New Features

    • Added college field to evaluations and final results for better organizational tracking
  • Improvements

    • College information automatically assigned from placement data when not explicitly provided
    • Access control filtering updated to use college-based permissions

Walkthrough

This PR introduces a nullable college foreign key field to both the Evaluations and FinalResults models, along with a corresponding database migration. The models auto-populate the college field from placement relationships when not explicitly provided, and view filtering logic is updated to constrain queries by college.

Changes

Cohort / File(s) Summary
Migration
logify-backend/apps/evaluations/migrations/0005_evaluations_college_finalresults_college.py
Adds nullable college foreign key fields to Evaluations and FinalResults models, both referencing academics.colleges with cascade-on-delete behavior.
Model Fields & Methods
logify-backend/apps/evaluations/models.py
Adds college foreign key field to both Evaluations and FinalResults models. Introduces save() method overrides on each model to auto-derive and assign college from placement.programme.department.college when not explicitly provided.
View Filtering Logic
logify-backend/apps/evaluations/views.py
Updates access-filtering logic in get_admin_college_placement_filter and academic-supervisor branches across EvaluationsViewSet, EvaluationScoresViewSet, and FinalResultsViewSet to filter by college_id instead of programme-derived constraints.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Through migrations swift and clear,
Colleges find their rightful home,
In evaluations, ever near,
From placements bloom and roam,
Filters now see far and wide,
With college logic as their guide! ✨


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

Review rate limit: 2/3 reviews remaining, refill in 20 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@Joshkovu Joshkovu merged commit d7521a4 into main May 1, 2026
5 of 8 checks passed
@Joshkovu Joshkovu review requested due to automatic review settings May 1, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant