fix: 工单图片/升级表冗余字段改名,避免与外键 gongdan_id 冲突

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-21 00:37:21 +08:00
parent a432a0b9c4
commit 27862fa22b
3 changed files with 7 additions and 6 deletions

View File

@@ -132,7 +132,7 @@ def _replace_images(gd, image_urls):
for i, url in enumerate(urls):
GongdanImage.objects.create(
gongdan=gd,
gongdan_id=gd.gongdan_id,
gongdan_hao=gd.gongdan_id,
url=url[:512],
paixu=i,
)
@@ -210,7 +210,7 @@ def escalate_gongdan(*, gongdan_id, yonghuid, shuoming, image_urls=None):
next_cishu = (gd.shengji_cishu or 0) + 1
GongdanShengji.objects.create(
gongdan=gd,
gongdan_id=gd.gongdan_id,
gongdan_hao=gd.gongdan_id,
cishu=next_cishu,
shuoming=text,
shenqingren_id=yonghuid,