chore: Embrace the walrus operator (#24127)

This commit is contained in:
John Bodley
2023-05-19 00:37:13 -07:00
committed by GitHub
parent 6b5459121f
commit d583ca9ef5
54 changed files with 100 additions and 185 deletions

View File

@@ -51,7 +51,6 @@ def sqlalchemy_uri_validator(
def schema_allows_file_upload(database: Database, schema: Optional[str]) -> bool:
if not database.allow_file_upload:
return False
schemas = database.get_schema_access_for_file_upload()
if schemas:
if schemas := database.get_schema_access_for_file_upload():
return schema in schemas
return security_manager.can_access_database(database)