mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-25 08:41:51 +00:00
remove old warnings
This commit is contained in:
parent
e97d60a1c4
commit
beb83e93f4
@ -59,7 +59,7 @@ LOGBOOK_PARSER_SETTINGS = {
|
||||
LOGBOOKS_DIR = "years" # subfolder of settings.EXPOWEB
|
||||
|
||||
ENTRIES = {
|
||||
"2024": 69,
|
||||
"2024": 87,
|
||||
"2023": 131,
|
||||
"2022": 94,
|
||||
"2019": 55,
|
||||
|
@ -2655,9 +2655,27 @@ def parse_one_file(fpath): # --------------------------------------in progress--
|
||||
|
||||
|
||||
def set_survexblocks():
|
||||
"""Need to find the optimal Django way of doing this query.
|
||||
It's a mess now"""
|
||||
"""This sets the links directly to each survexblock.
|
||||
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():
|
||||
# if not b.date:
|
||||
# print(f" Block {b} on {b.survexfile} HAS NULL DATE ")
|
||||
@ -2686,17 +2704,17 @@ def set_survexblocks():
|
||||
# continue
|
||||
blocks = SurvexBlock.objects.filter(survexfile=sfile)
|
||||
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:
|
||||
pass
|
||||
elif b.scanswallet:
|
||||
if b.date > date(2019, 1, 1) and b.date < date(2020, 1, 1):
|
||||
print(f"not set{wallet} on {b.survexfile} : {b} as already set to {b.scanswallet}")
|
||||
if b.date > date(2024, 1, 1) and b.date < date(2025, 1, 1):
|
||||
print(f"2019 not set{wallet} on {b.survexfile} for block {b} as set explicitly to {b.scanswallet}")
|
||||
else:
|
||||
b.scanswallet = wallet
|
||||
b.save()
|
||||
if b.date > date(2019, 1, 1) and b.date < date(2020, 1, 1):
|
||||
print(f"setting {wallet} on {b.survexfile} : {b}")
|
||||
b.scanswallet = wallet
|
||||
b.save()
|
||||
if b.date > date(2024, 1, 1) and b.date < date(2025, 1, 1):
|
||||
print(f"2019 setting {wallet} on {b.survexfile} for block {b}")
|
||||
|
||||
def survexifywallets():
|
||||
"""Gets the caves from the list of survexblocks
|
||||
|
Loading…
Reference in New Issue
Block a user