diff --git a/app/tasks/minetestcheck/tree.py b/app/tasks/minetestcheck/tree.py index 3cb20952..a873e65e 100644 --- a/app/tasks/minetestcheck/tree.py +++ b/app/tasks/minetestcheck/tree.py @@ -235,9 +235,12 @@ class PackageTreeNode: # Calculate short description if "description" in result: desc = result["description"] - idx = desc.find(".") + 1 - cutIdx = min(len(desc), 200 if idx < 5 else idx) - result["short_description"] = desc[:cutIdx] + if len(desc) > 200: + idx = desc.find(".") + 1 + idx = min(len(desc), 200 if idx < 5 else idx) + result["short_description"] = desc[:idx] + else: + result["short_description"] = desc if "name" in result: self.name = result["name"]