mirror of https://github.com/zulip/zulip.git
decorator: Remove now-unnecessary cast.
This commit is contained in:
parent
5ebe507c9b
commit
5b8d04e18f
|
@ -203,7 +203,6 @@ def validate_api_key(request, role, api_key, is_webhook=False):
|
||||||
if api_key != profile.api_key:
|
if api_key != profile.api_key:
|
||||||
raise JsonableError(_("Invalid API key"))
|
raise JsonableError(_("Invalid API key"))
|
||||||
|
|
||||||
profile = cast(UserProfile, profile) # is UserProfile
|
|
||||||
if not profile.is_active:
|
if not profile.is_active:
|
||||||
raise JsonableError(_("Account not active"))
|
raise JsonableError(_("Account not active"))
|
||||||
if profile.realm.deactivated:
|
if profile.realm.deactivated:
|
||||||
|
|
Loading…
Reference in New Issue