Add condition to skip short url creation if its an empty string

This commit is contained in:
Roger Fedor
2026-08-29 16:00:49 -05:00
parent 31fc107e5f
commit ee200670fc
+2 -2
View File
@@ -76,9 +76,9 @@ def _filter_shorten_url(value: str, ctx: dict[str, Any], args: str) -> str:
config = ctx.get('config')
if logger is not None:
logger.debug("Shortening URL %r", value)
if config is None:
if config is None or value == '':
if logger is not None:
logger.debug("Abandoning shorten url due to missing config")
logger.debug("Abandoning shorten url due to empty value or config")
return value
return shorten_url_sync(value, config=config, logger=logger) or value