Skip to content

Commit

Permalink
Fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
minhaminha committed Feb 7, 2025
1 parent a02fab8 commit f167f55
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions corehq/apps/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
username_to_user_id,
bulk_auto_deactivate_commcare_users,
is_dimagi_email,
SYSTEM_USER_ID,
)
from corehq.const import INVITATION_CHANGE_VIA_WEB
from corehq.form_processor.exceptions import CaseNotFound
Expand Down Expand Up @@ -2774,6 +2775,8 @@ def delete(self, **kwargs):
deleted_by = kwargs.get('deleted_by')
if not deleted_by and not settings.UNIT_TESTING:
raise ValueError("Missing deleted_by")
elif not deleted_by and settings.UNIT_TESTING:
deleted_by = SYSTEM_USER_ID
log_invitation_change(
domain=self.domain,
user_id=user.user_id if user else None,
Expand Down

0 comments on commit f167f55

Please sign in to comment.