lty/qy_lty/docs/修改记录.md
pmc bd95ba470c feat: update admin panel, API modules, and add migrations
- Update food, outfits, props, home-decor pages and components
- Add permissions page and sidebar updates
- Update API client and all API modules (auth, food, dances, etc.)
- Add card model migrations for optional fields
- Update Django views, serializers, and authentication
- Add affinity level migrations and user app updates
- Add project documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:06:50 +08:00

1.1 KiB
Raw Blame History

服务器端代码修改记录

本文档记录每次对服务器端代码的修改,方便追踪变更历史。


修改格式说明

每次修改按以下格式记录:

### [日期] 修改简述

- **文件路径**: 相对于项目根目录的文件路径
- **修改类型**: 新增 / 修改 / 删除 / 重构 / 修复Bug
- **修改内容**: 具体修改了什么
- **修改原因**: 为什么要做这个修改

修改历史

[2026-03-17] 修复手机号登录时 IntegrityError

  • 文件路径: userapp/views.py
  • 修改类型: 修复Bug
  • 修改内容: PhoneLoginView.post()get_or_create 新增 defaults={'username': phone_number}
  • 修改原因: 新用户首次通过手机号登录时,get_or_create 未设置 username 字段,导致 username="" 与数据库中已有空 username 记录冲突,触发 IntegrityError: duplicate key value violates unique constraint "userapp_paradiseuser_username_key"。改为用手机号作为默认 username保证唯一性。