[models] don't warn on empty description
This commit is contained in:
parent
50db5b9192
commit
f4caba78e8
1 changed files with 5 additions and 4 deletions
|
|
@ -37,13 +37,14 @@ def make_teilchen_input(text: str) -> TeilchenCreate | None:
|
||||||
|
|
||||||
description_start = text.find('"', name_end + 1)
|
description_start = text.find('"', name_end + 1)
|
||||||
description_end = text.find('"', description_start + 1)
|
description_end = text.find('"', description_start + 1)
|
||||||
|
if description_end > description_start:
|
||||||
description = text[description_start:description_end]
|
description = text[description_start:description_end]
|
||||||
if not description:
|
else:
|
||||||
logger.warning("Could not extract description.")
|
description = ""
|
||||||
|
|
||||||
tags = re.findall(r"#\w+", text.lower())
|
tags = re.findall(r"#\w+", text.lower())
|
||||||
if not tags:
|
if not tags:
|
||||||
logger.warning("No tags found in text.")
|
logger.info("No tags found in text.")
|
||||||
|
|
||||||
return TeilchenCreate(
|
return TeilchenCreate(
|
||||||
name=name,
|
name=name,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue