mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 14:51:38 +00:00
now consistent with survex blocks only from expo
This commit is contained in:
@@ -28,11 +28,13 @@ def legs_by_expo(expos):
|
||||
for expedition in expos:
|
||||
survexblocks = expedition.survexblock_set.all()
|
||||
legsyear = 0
|
||||
nblocks = 0
|
||||
survexleglength = 0.0
|
||||
for sb in survexblocks:
|
||||
if not sb.foreigners:
|
||||
survexleglength += sb.legslength
|
||||
legsyear += int(sb.legsall)
|
||||
nblocks += 1
|
||||
addupsurvexlength += survexleglength
|
||||
addupsurvexlegs += legsyear
|
||||
|
||||
@@ -42,7 +44,7 @@ def legs_by_expo(expos):
|
||||
else:
|
||||
success = ""
|
||||
tourists = PersonExpedition.objects.filter(expedition=expedition, noncaver=True).count()
|
||||
legsbyexpo.append((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength}))
|
||||
legsbyexpo.append((expedition, {"success":success, "people": expoers, "tourists": tourists, "nsurvexlegs": legsyear, "survexleglength": survexleglength, "nblocks": nblocks}))
|
||||
legsbyexpo.reverse()
|
||||
return legsbyexpo, addupsurvexlegs, addupsurvexlength
|
||||
|
||||
|
||||
Reference in New Issue
Block a user