models: Add USER_SOFT_DEACTIVATED event type constant to RealmAuditLog.

This commit is contained in:
Vishnu Ks 2018-07-10 15:14:15 +05:30 committed by Tim Abbott
parent 547b5675c6
commit c7cb0c6aa0
2 changed files with 2 additions and 1 deletions

View File

@ -181,7 +181,7 @@ def do_soft_deactivate_users(users: List[UserProfile]) -> List[UserProfile]:
log = RealmAuditLog(
realm=user.realm,
modified_user=user,
event_type='user_soft_deactivated',
event_type=RealmAuditLog.USER_SOFT_DEACTIVATED,
event_time=event_time
)
realm_logs.append(log)

View File

@ -1966,6 +1966,7 @@ class RealmAuditLog(models.Model):
USER_DEACTIVATED = 'user_deactivated'
USER_REACTIVATED = 'user_reactivated'
USER_SOFT_ACTIVATED = 'user_soft_activated'
USER_SOFT_DEACTIVATED = 'user_soft_deactivated'
USER_CHANGE_PASSWORD = 'user_change_password'
USER_CHANGE_AVATAR_SOURCE = 'user_change_avatar_source'
USER_FULL_NAME_CHANGED = 'user_full_name_changed'