mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2025-12-18 11:37:12 +00:00
remove old warnings
This commit is contained in:
@@ -59,7 +59,7 @@ LOGBOOK_PARSER_SETTINGS = {
|
|||||||
LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
|
LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
|
||||||
|
|
||||||
ENTRIES = {
|
ENTRIES = {
|
||||||
"2024": 69,
|
"2024": 87,
|
||||||
"2023": 131,
|
"2023": 131,
|
||||||
"2022": 94,
|
"2022": 94,
|
||||||
"2019": 55,
|
"2019": 55,
|
||||||
|
|||||||
@@ -2655,9 +2655,27 @@ def parse_one_file(fpath): # --------------------------------------in progress--
|
|||||||
|
|
||||||
|
|
||||||
def set_survexblocks():
|
def set_survexblocks():
|
||||||
"""Need to find the optimal Django way of doing this query.
|
"""This sets the links directly to each survexblock.
|
||||||
It's a mess now"""
|
NB ARGE inserts survexblocks from several different expeditions into one survexfile
|
||||||
|
Also a survex block e.g. "1623" will include lots of different expeditons
|
||||||
|
|
||||||
|
from models/survex.py:
|
||||||
|
|
||||||
|
name = models.CharField(max_length=100) ..often blank, no #NoName..
|
||||||
|
date = models.DateField( ..inherited
|
||||||
|
title = models.CharField(max_length=200) ..inherited
|
||||||
|
parent = models.ForeignKey("SurvexBlock"
|
||||||
|
|
||||||
|
expedition = models.ForeignKey("Expedition",
|
||||||
|
survexfile = models.ForeignKey("SurvexFile",
|
||||||
|
scanswallet = models.ForeignKey("Wallet",
|
||||||
|
|
||||||
|
legsall = models.IntegerField(null=True)
|
||||||
|
legslength = models.FloatField(null=True)
|
||||||
|
"""
|
||||||
|
|
||||||
|
# Need to find the optimal Django way of doing this query.
|
||||||
|
# It's a mess now
|
||||||
# for b in SurvexBlock.objects.all():
|
# for b in SurvexBlock.objects.all():
|
||||||
# if not b.date:
|
# if not b.date:
|
||||||
# print(f" Block {b} on {b.survexfile} HAS NULL DATE ")
|
# print(f" Block {b} on {b.survexfile} HAS NULL DATE ")
|
||||||
@@ -2686,17 +2704,17 @@ def set_survexblocks():
|
|||||||
# continue
|
# continue
|
||||||
blocks = SurvexBlock.objects.filter(survexfile=sfile)
|
blocks = SurvexBlock.objects.filter(survexfile=sfile)
|
||||||
for b in blocks:
|
for b in blocks:
|
||||||
if b.date: # many are NULL
|
if b.date: # many are NULL, e.g. ARGE, so have no wallet
|
||||||
if b.scanswallet == wallet:
|
if b.scanswallet == wallet:
|
||||||
pass
|
pass
|
||||||
elif b.scanswallet:
|
elif b.scanswallet:
|
||||||
if b.date > date(2019, 1, 1) and b.date < date(2020, 1, 1):
|
if b.date > date(2024, 1, 1) and b.date < date(2025, 1, 1):
|
||||||
print(f"not set{wallet} on {b.survexfile} : {b} as already set to {b.scanswallet}")
|
print(f"2019 not set{wallet} on {b.survexfile} for block {b} as set explicitly to {b.scanswallet}")
|
||||||
else:
|
else:
|
||||||
b.scanswallet = wallet
|
b.scanswallet = wallet
|
||||||
b.save()
|
b.save()
|
||||||
if b.date > date(2019, 1, 1) and b.date < date(2020, 1, 1):
|
if b.date > date(2024, 1, 1) and b.date < date(2025, 1, 1):
|
||||||
print(f"setting {wallet} on {b.survexfile} : {b}")
|
print(f"2019 setting {wallet} on {b.survexfile} for block {b}")
|
||||||
|
|
||||||
def survexifywallets():
|
def survexifywallets():
|
||||||
"""Gets the caves from the list of survexblocks
|
"""Gets the caves from the list of survexblocks
|
||||||
|
|||||||
Reference in New Issue
Block a user