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

pull/7498/head
xinwen 3 years ago committed by Jiangjie.Bai
parent 106bb9b63d
commit 088676d998

@ -261,7 +261,7 @@ class Ticket(CommonModelMixin, OrgModelMixin):
date_created = as_current_tz(self.date_created) date_created = as_current_tz(self.date_created)
date_prefix = date_created.strftime('%Y%m%d') 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 serial_num__startswith=date_prefix
).order_by('-date_created').first() ).order_by('-date_created').first()

Loading…
Cancel
Save