mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-29 13:21:54 +00:00
Clear data issues for logbooks before reloading
This commit is contained in:
parent
dc479b33c5
commit
4e187581b3
@ -326,12 +326,16 @@ def LoadLogbookForExpedition(expedition):
|
|||||||
|
|
||||||
|
|
||||||
def LoadLogbooks():
|
def LoadLogbooks():
|
||||||
""" This is the master function for parsing all logbooks into the Troggle database. Requires yearlinks, which is a list of tuples for each expedition with expedition year, logbook path, and parsing function. """
|
""" This is the master function for parsing all logbooks into the Troggle database. """
|
||||||
|
|
||||||
|
# Clear the logbook data issues as we are reloading
|
||||||
|
models.DataIssue.filter(parser='logbooks').delete()
|
||||||
|
# Fetch all expos
|
||||||
expos = models.Expedition.objects.all()
|
expos = models.Expedition.objects.all()
|
||||||
for expo in expos:
|
for expo in expos:
|
||||||
print("\nLoading Logbook for: " + expo.year)
|
print("\nLoading Logbook for: " + expo.year)
|
||||||
|
|
||||||
|
# Load logbook for expo
|
||||||
LoadLogbookForExpedition(expo)
|
LoadLogbookForExpedition(expo)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user