Skip to content

Commit 72f2ced

Browse files
committed
fix(utils): avoid treating blank string as setting name
Fixes #1420
1 parent b35f716 commit 72f2ced

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

social_core/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,11 @@ def is_url(value):
228228
return value and (value.startswith(("http://", "https://", "/")))
229229

230230

231-
def setting_url(backend, *names):
231+
def setting_url(backend, *names: str | None) -> str | None:
232232
for name in names:
233+
# Name can actually None, value or setting name
234+
if not name:
235+
continue
233236
if is_url(name):
234237
return name
235238
value = backend.setting(name)

0 commit comments

Comments
 (0)