Simplify condition
This commit is contained in:
parent
75dd20ebcc
commit
52cd9d2692
|
@ -54,10 +54,9 @@ def email_validator():
|
||||||
def user_can_create_contacts(user: User) -> bool:
|
def user_can_create_contacts(user: User) -> bool:
|
||||||
if user.is_premium():
|
if user.is_premium():
|
||||||
return True
|
return True
|
||||||
return (
|
if user.flags & User.FLAG_FREE_DISABLE_CREATE_ALIAS == 0:
|
||||||
not config.DISABLE_CREATE_CONTACTS_FOR_FREE_USERS
|
return True
|
||||||
or user.flags & User.FLAG_FREE_DISABLE_CREATE_ALIAS == 0
|
return not config.DISABLE_CREATE_CONTACTS_FOR_FREE_USERS
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def create_contact(user: User, alias: Alias, contact_address: str) -> Contact:
|
def create_contact(user: User, alias: Alias, contact_address: str) -> Contact:
|
||||||
|
|
Loading…
Reference in a new issue