🐛(back) add missing color option for project colors#341
🐛(back) add missing color option for project colors#341
Conversation
Signed-off-by: Laurent Paoletti <lp@providenz.fr>
WalkthroughThis PR adds a new color option ("Color 10") to the ChatProject model by extending the ChatProjectColor enum, updating a Django migration, and adding a parametrized test to verify all project colors work correctly. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/backend/chat/migrations/0006_chatproject_chatconversation_project.py`:
- Line 90: The migration 0006_chatproject_chatconversation_project.py was
modified to add the missing "color_10" choice in the CreateModel choices tuple,
but you must first verify this migration has not been applied anywhere; check
all environments (dev/staging/prod) for migration 0006 applied status and if it
has been applied, do NOT alter this migration file. If 0006 has been applied
anywhere, instead revert this change and create a new migration that uses
AlterField on the ChatProject/ChatConversation field (the field with the choices
tuple that previously missed "color_10") to add the missing choice; if 0006 has
not been applied anywhere, it's safe to keep the edited CreateModel choices
including ("color_10", "Color 10").
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ec40ed46-77d0-4b73-8319-8c9e795c476d
📒 Files selected for processing (4)
CHANGELOG.mdsrc/backend/chat/migrations/0006_chatproject_chatconversation_project.pysrc/backend/chat/models.pysrc/backend/chat/tests/views/projects/test_create.py
src/backend/chat/migrations/0006_chatproject_chatconversation_project.py
Show resolved
Hide resolved
|
qbey
left a comment
There was a problem hiding this comment.
I wonder if the number of colors should be a setting ? no need to change it, keep it simple for now



Purpose
Backend only defined 9 project colors but the frontend expects 10
NB: an existing migration is edited (entry added to choices)
Summary by CodeRabbit
Bug Fixes
Tests