Browse Source

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

pull/7498/head
xinwen 3 years ago committed by Jiangjie.Bai
parent
commit
088676d998
  1. 2
      apps/tickets/models/ticket.py

2
apps/tickets/models/ticket.py

@ -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()

Loading…
Cancel
Save