2
0
mirror of https://expo.survex.com/repositories/troggle/.git synced 2024-11-25 16:51:54 +00:00

Clear data issues for logbooks before reloading

This commit is contained in:
Sam Wenham 2019-04-18 19:26:09 +01:00
parent ae284a1f30
commit bfe018cde6

View File

@ -326,12 +326,16 @@ def LoadLogbookForExpedition(expedition):
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()
for expo in expos:
print("\nLoading Logbook for: " + expo.year)
# Load logbook for expo
LoadLogbookForExpedition(expo)