better account for empty comprehension

This commit is contained in:
Cal 2025-12-08 22:31:21 -07:00
parent bf36163b42
commit 8c895fb1b5

View file

@ -1511,7 +1511,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
key = self.key
num = 1
if self.location:
num = max(0, *[
num = max([0]+[
int(obj.key.lstrip(key))
for obj in self.location.contents
if obj.key.startswith(key) and obj.key.lstrip(key).isdigit()