2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2026-01-19 04:03:02 +00:00

tidy return failure value

This commit is contained in:
2025-08-01 12:48:41 +02:00
parent 962263beb0
commit 6ee06f0879

View File

@@ -733,8 +733,8 @@ def edit_entrance(request, path="", caveslug=None, entslug=None):
"""
slugname = f"{slug}{letter}"
nents = Entrance.objects.filter(slug=slugname).count()
if not (c:= get_cave_from_slug(caveslug)): # walrus operator
return None
if not (c:= get_cave_from_slug(slug)): # walrus operator
return False
print(f"check_new_slugname_ok() {slugname=} {letter=} => {nents}=(number of entrances) ")
if nents == 0:
# looks good, but we need to check the CaveaAndEntrance object too