mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 07:23:22 +00:00
Access the UserProfile's new is_active field rather than User's.
(imported from commit ed5bdaf3e3d6d20bfb741efdac48d30482ab9ef7)
This commit is contained in:
@@ -17,7 +17,7 @@ def is_unique(value):
|
||||
|
||||
def is_inactive(value):
|
||||
try:
|
||||
if get_user_profile_by_email(value).user.is_active:
|
||||
if get_user_profile_by_email(value).is_active:
|
||||
raise ValidationError(u'%s is already active' % value)
|
||||
except UserProfile.DoesNotExist:
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user