Skip to content

Commit 99dd5e4

Browse files
committed
Tweak DatabaseURL.database implementation
1 parent aea363c commit 99dd5e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

databases/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ def netloc(self) -> typing.Optional[str]:
363363
@property
364364
def database(self) -> str:
365365
path = self.components.path
366-
if path[:1] == "/":
367-
return path[1:]
366+
if path.startswith("/")
367+
path = path[1:]
368368
return path
369369

370370
@property

0 commit comments

Comments
 (0)