diff --git a/src/teilchensammler_cli/models.py b/src/teilchensammler_cli/models.py index 1432078..ecc1303 100644 --- a/src/teilchensammler_cli/models.py +++ b/src/teilchensammler_cli/models.py @@ -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) - description = text[description_start:description_end] - if not description: - logger.warning("Could not extract description.") + if description_end > description_start: + description = text[description_start:description_end] + 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,