fix: 计算工单序号的时候切换到root组织

pull/7498/head
xinwen 2022-01-14 10:51:18 +08:00 committed by Jiangjie.Bai
parent 106bb9b63d
commit 088676d998
1 changed files with 1 additions and 1 deletions

View File

@ -261,7 +261,7 @@ class Ticket(CommonModelMixin, OrgModelMixin):
date_created = as_current_tz(self.date_created)
date_prefix = date_created.strftime('%Y%m%d')
ticket = Ticket.objects.select_for_update().filter(
ticket = Ticket.all().select_for_update().filter(
serial_num__startswith=date_prefix
).order_by('-date_created').first()