如果账户禁用,不再发送短信通知
This commit is contained in:
parent
6f25ebdd42
commit
ee4a0448ca
|
@ -24,11 +24,11 @@ def send_ticket_notice(ticket_id):
|
||||||
if ticket:
|
if ticket:
|
||||||
if ticket.participant_type == 1:
|
if ticket.participant_type == 1:
|
||||||
# 发送短信通知
|
# 发送短信通知
|
||||||
pt = User.objects.filter(id=ticket.participant).first()
|
pt = User.objects.filter(id=ticket.participant, is_active=True).first()
|
||||||
if pt and pt.phone:
|
if pt and pt.phone:
|
||||||
send_sms(pt.phone, 1002, params)
|
send_sms(pt.phone, 1002, params)
|
||||||
elif ticket.participant_type == 2:
|
elif ticket.participant_type == 2:
|
||||||
pts = User.objects.filter(id__in=ticket.participant)
|
pts = User.objects.filter(id__in=ticket.participant, is_active=True)
|
||||||
for i in pts:
|
for i in pts:
|
||||||
if i.phone:
|
if i.phone:
|
||||||
send_sms(i.phone, 1002, params)
|
send_sms(i.phone, 1002, params)
|
||||||
|
|
Loading…
Reference in New Issue