summaryrefslogtreecommitdiffstats
path: root/parsers
diff options
context:
space:
mode:
authorSam Wenham <sam@wenhams.co.uk>2019-04-18 19:26:09 +0100
committerSam Wenham <sam@wenhams.co.uk>2019-04-18 19:26:09 +0100
commit4e187581b315d7fee5ded0bfdf2590f6f170c7b9 (patch)
tree1e7871a0c78c54de0e6d0fb76ac7c19c0fe37739 /parsers
parentdc479b33c5ec0b9208c64ac82a418afbca18c9f4 (diff)
downloadtroggle-4e187581b315d7fee5ded0bfdf2590f6f170c7b9.tar.gz
troggle-4e187581b315d7fee5ded0bfdf2590f6f170c7b9.tar.bz2
troggle-4e187581b315d7fee5ded0bfdf2590f6f170c7b9.zip
Clear data issues for logbooks before reloading
Diffstat (limited to 'parsers')
-rw-r--r--parsers/logbooks.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index bf6081f..ad06c8e 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -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)