fix: 事件通知只发给active的账号
This commit is contained in:
parent
b217f30c59
commit
8628d0a74b
|
|
@ -174,7 +174,7 @@ def create_remind(event: Event, params: dict):
|
||||||
'can_handle': i.can_handle,
|
'can_handle': i.can_handle,
|
||||||
})
|
})
|
||||||
elif i.post and area_level >= i.filter_area_level:
|
elif i.post and area_level >= i.filter_area_level:
|
||||||
qs = User.objects.filter(posts=i.post)
|
qs = User.objects.filter(posts=i.post, is_active=True)
|
||||||
if i.filter_recipient == 20: # 当事人所在部门以上
|
if i.filter_recipient == 20: # 当事人所在部门以上
|
||||||
if event.employee and event.employee.user:
|
if event.employee and event.employee.user:
|
||||||
qs = qs.filter(depts__in=get_parent_queryset(event.employee.user.belong_dept))
|
qs = qs.filter(depts__in=get_parent_queryset(event.employee.user.belong_dept))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue