mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
restore crash to try to debug
This commit is contained in:
parent
478f8b9ea1
commit
18a8fcbfb5
@ -725,7 +725,7 @@ def GetCaveLookup():
|
|||||||
if Gcave_count[c] > 1:
|
if Gcave_count[c] > 1:
|
||||||
message = f" ** Duplicate cave id count={Gcave_count[c]} id:'{Gcavelookup[c]}' cave __str__:'{c}'"
|
message = f" ** Duplicate cave id count={Gcave_count[c]} id:'{Gcavelookup[c]}' cave __str__:'{c}'"
|
||||||
print(message)
|
print(message)
|
||||||
DataIssue.objects.update_or_create(parser="aliases", message=message)
|
update_dataissue("aliases", message)
|
||||||
|
|
||||||
return Gcavelookup
|
return Gcavelookup
|
||||||
|
|
||||||
@ -733,9 +733,11 @@ def GetCaveLookup():
|
|||||||
def update_dataissue(parsercode, message):
|
def update_dataissue(parsercode, message):
|
||||||
try:
|
try:
|
||||||
DataIssue.objects.update_or_create(parser=parsercode, message=message)
|
DataIssue.objects.update_or_create(parser=parsercode, message=message)
|
||||||
except DataError:
|
except DataError as e:
|
||||||
# bollocks, swallow this.
|
# bollocks, swallow this.DANGEROUS. Assuming this is the
|
||||||
pass
|
# (1406, "Data too long for column 'message' at row1")
|
||||||
|
# fault in the mariaDb/Django setup.
|
||||||
|
raise
|
||||||
except:
|
except:
|
||||||
# Complete bollocks, but MariaDB barfs when it shouldn't : Django 3.2
|
# Complete bollocks, but MariaDB barfs when it shouldn't : Django 3.2
|
||||||
issues = DataIssue.objects.filter(parser=parsercode, message=message)
|
issues = DataIssue.objects.filter(parser=parsercode, message=message)
|
||||||
|
@ -193,7 +193,8 @@ def logbookedit(request, year=None, slug=None):
|
|||||||
else:
|
else:
|
||||||
year = slug[0:4]
|
year = slug[0:4]
|
||||||
try:
|
try:
|
||||||
year = str(int(year))
|
year = str(int(year)) # but maybe slug was hand-edited to be a future year..
|
||||||
|
year = validate_year(year) # so fix that
|
||||||
except:
|
except:
|
||||||
year = current_expo()
|
year = current_expo()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user