summaryrefslogtreecommitdiffstats
path: root/parsers/survex.py
diff options
context:
space:
mode:
authorgoatchurch <goatchurch@ubuntu.clocksoft.dom>2009-09-11 23:56:47 +0100
committergoatchurch <goatchurch@ubuntu.clocksoft.dom>2009-09-11 23:56:47 +0100
commit12cf3a6d534e5038b5d78b11a03cef2b81f5f852 (patch)
tree30d6f4e0891ae28750ca9dd97c74432c17683384 /parsers/survex.py
parentb80168c099b5805dfc9c1fee576d00cabc31e2d2 (diff)
downloadtroggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.tar.gz
troggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.tar.bz2
troggle-12cf3a6d534e5038b5d78b11a03cef2b81f5f852.zip
tunnelfiles scheme added
Diffstat (limited to 'parsers/survex.py')
-rw-r--r--parsers/survex.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/parsers/survex.py b/parsers/survex.py
index 985d4e5..f8ec6d4 100644
--- a/parsers/survex.py
+++ b/parsers/survex.py
@@ -69,7 +69,6 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
mref = comment and re.match('.*?ref.*?(\d+)\s*#\s*(\d+)', comment)
if mref:
refscan = "%s#%s" % (mref.group(1), mref.group(2))
- print refscan
survexscansfolders = models.SurvexScansFolder.objects.filter(walletname=refscan)
if survexscansfolders:
survexblock.survexscansfolder = survexscansfolders[0]
@@ -125,7 +124,9 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
if expeditions:
assert len(expeditions) == 1
survexblock.expedition = expeditions[0]
- survexblock.expeditiondate = survexblock.expedition.get_expedition_day(survexblock.date)
+ survexblock.expeditionday = survexblock.expedition.get_expedition_day(survexblock.date)
+ survexblock.save()
+
elif re.match("team$(?i)", cmd):
mteammember = re.match("(Insts|Notes|Tape|Dog|Useless|Pics|Helper|Disto|Consultant)\s+(.*)$(?i)", line)
if mteammember:
@@ -135,6 +136,7 @@ def RecursiveLoad(survexblock, survexfile, fin, textlines):
if (personexpedition, tm) not in teammembers:
teammembers.append((personexpedition, tm))
personrole = models.SurvexPersonRole(survexblock=survexblock, nrole=mteammember.group(1).lower(), personexpedition=personexpedition, personname=tm)
+ personrole.expeditionday = survexblock.expeditionday
if personexpedition:
personrole.person=personexpedition.person
personrole.save()