Applied some fixes suggested by @withshubh in #1260

This commit is contained in:
Simon Willison 2021-03-28 17:20:55 -07:00
commit d579fcf4f7
2 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ def permission_allowed(actor, action):
elif action == "this_is_denied":
return False
elif action == "view-database-download":
return (actor and actor.get("can_download")) or None
return actor.get("can_download") if actor else None
@hookimpl