[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_end = text.find('"', description_start + 1)
|
||||
if description_end > description_start:
|
||||
description = text[description_start:description_end]
|
||||
if not description:
|
||||
logger.warning("Could not extract description.")
|
||||
else:
|
||||
description = ""
|
||||
|
||||
tags = re.findall(r"#\w+", text.lower())
|
||||
if not tags:
|
||||
logger.warning("No tags found in text.")
|
||||
logger.info("No tags found in text.")
|
||||
|
||||
return TeilchenCreate(
|
||||
name=name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue