Skip to content

Commit

Permalink
block manual sends to withdrawn (probably never hit, but don't leave …
Browse files Browse the repository at this point in the history
…door open)
  • Loading branch information
pbugni committed Mar 26, 2024
1 parent baeceaa commit d282d98
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions portal/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,14 @@ def send_user_messages(user, force_update=False):
if force_update:
for rs_id in users_rs_ids:
invalidate_users_QBT(user_id=user.id, research_study_id=rs_id)
qbd = QB_Status(
qbstatus = QB_Status(
user=user,
research_study_id=rs_id,
as_of_date=datetime.utcnow()).current_qbd()
as_of_date=datetime.utcnow())
if qbstatus.withdrawn_by(datetime.utcnow()):
# NEVER notify withdrawn patients
continue
qbd = qbstatus.current_qbd()
if qbd:
queue_outstanding_messages(
user=user,
Expand Down

0 comments on commit d282d98

Please sign in to comment.