fix: 事件通知只发给active的账号

This commit is contained in:
caoqianming 2023-03-23 11:16:56 +08:00
parent b217f30c59
commit 8628d0a74b
1 changed files with 1 additions and 1 deletions

View File

@ -174,7 +174,7 @@ def create_remind(event: Event, params: dict):
'can_handle': i.can_handle,
})
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 event.employee and event.employee.user:
qs = qs.filter(depts__in=get_parent_queryset(event.employee.user.belong_dept))