mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
hide warning msgs about pre 1999 wallets
This commit is contained in:
parent
2506517e17
commit
f3d5a389eb
@ -56,9 +56,24 @@ def make_valid_date(date):
|
||||
print(f"! - Failed to understand date, none of our tricks worked {datestr=} ")
|
||||
return None
|
||||
|
||||
archaic_wallets = [
|
||||
'1984AndysNotebook',
|
||||
'1984BrownLandscapeNotebook',
|
||||
'1989LUSS',
|
||||
'1989surveybook',
|
||||
'1990Surveybookkh',
|
||||
'1991surveybook',
|
||||
'1992-94Surveybookkh',
|
||||
'1994',
|
||||
'1995-96kh',
|
||||
'1996-1999NotKHbook',
|
||||
'1997-99kh',
|
||||
'1999',
|
||||
'loosepages',
|
||||
]
|
||||
class Wallet(models.Model):
|
||||
"""We do not keep the JSON values in the database, we query them afresh each time,
|
||||
but we will change this when we need to do a Django query on e.g. personame
|
||||
but we may change this if we need to do a Django query on e.g. personame
|
||||
"""
|
||||
|
||||
fpath = models.CharField(max_length=200)
|
||||
@ -95,9 +110,10 @@ class Wallet(models.Model):
|
||||
|
||||
jsonfile = Path(settings.DRAWINGS_DATA, "walletjson") / wyear / wname / "contents.json"
|
||||
if not Path(jsonfile).is_file():
|
||||
if wname not in archaic_wallets:
|
||||
message = f"! {jsonfile} is not a file {wyear=} {wname=} "
|
||||
from troggle.core.models.troggle import DataIssue
|
||||
print(message)
|
||||
from troggle.core.models.troggle import DataIssue
|
||||
DataIssue.objects.update_or_create(parser="wallets", message=message, url=wurl)
|
||||
return None
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user