Use "is None" instead of "== None"
This commit is contained in:
parent
76ba2e8b6c
commit
dd94660ef0
@ -68,7 +68,7 @@ else:
|
|||||||
|
|
||||||
def read_authorized(user, collection):
|
def read_authorized(user, collection):
|
||||||
"""Check if the user is allowed to read the collection."""
|
"""Check if the user is allowed to read the collection."""
|
||||||
if user == None:
|
if user is None:
|
||||||
return False
|
return False
|
||||||
elif owner_only.read_authorized(user, collection):
|
elif owner_only.read_authorized(user, collection):
|
||||||
return True
|
return True
|
||||||
@ -80,7 +80,7 @@ def read_authorized(user, collection):
|
|||||||
|
|
||||||
def write_authorized(user, collection):
|
def write_authorized(user, collection):
|
||||||
"""Check if the user is allowed to write the collection."""
|
"""Check if the user is allowed to write the collection."""
|
||||||
if user == None:
|
if user is None:
|
||||||
return False
|
return False
|
||||||
elif owner_only.read_authorized(user, collection):
|
elif owner_only.read_authorized(user, collection):
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user