Fix rating creation: inject user_id in model_dump
This commit is contained in:
parent
bceb7cb8c2
commit
ce7bb81e64
2 changed files with 8 additions and 5 deletions
|
|
@ -110,8 +110,10 @@ def create_rating(
|
|||
session.refresh(existing_rating)
|
||||
return existing_rating
|
||||
|
||||
db_rating = Rating.model_validate(rating)
|
||||
db_rating.user_id = current_user.id
|
||||
# Create new rating with user_id injected
|
||||
rating_data = rating.model_dump()
|
||||
rating_data["user_id"] = current_user.id
|
||||
db_rating = Rating.model_validate(rating_data)
|
||||
session.add(db_rating)
|
||||
|
||||
# Award XP for new rating
|
||||
|
|
|
|||
|
|
@ -156,9 +156,10 @@
|
|||
|
||||
### Immediate (Testing)
|
||||
|
||||
1. [ ] Register test account to trigger verification email
|
||||
2. [ ] Test password reset flow
|
||||
3. [ ] Monitor email deliverability in Postal dashboard
|
||||
1. [x] Register test account to trigger verification email
|
||||
2. [x] Registration UX shows "Check Your Email" message
|
||||
3. [ ] Test password reset flow
|
||||
4. [ ] Monitor email deliverability in Postal dashboard
|
||||
|
||||
### This Week
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue