summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorexpoonserver <devnull@localhost>2017-03-07 15:44:42 +0000
committerexpoonserver <devnull@localhost>2017-03-07 15:44:42 +0000
commit5e9dfc6ea6ff59f7e23a7e83e0c8415dccc4ffce (patch)
tree8a1e8b943a7ccd2345c4c7efa8f39dbbaa0de664
parent27fca090fc465cf6056c0981b126b78ea172d688 (diff)
downloadtroggle-5e9dfc6ea6ff59f7e23a7e83e0c8415dccc4ffce.tar.gz
troggle-5e9dfc6ea6ff59f7e23a7e83e0c8415dccc4ffce.tar.bz2
troggle-5e9dfc6ea6ff59f7e23a7e83e0c8415dccc4ffce.zip
Fix Scan scanning, so that 2015#X01 format (with 'X') is accepted in
scan directories. Allows 2016 data to be processed.
-rw-r--r--core/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/models.py b/core/models.py
index fa41f95..8527015 100644
--- a/core/models.py
+++ b/core/models.py
@@ -801,8 +801,8 @@ class DPhoto(TroggleImageModel):
scansFileStorage = FileSystemStorage(location=settings.SURVEY_SCANS, base_url=settings.SURVEYS_URL)
def get_scan_path(instance, filename):
year=instance.survey.expedition.year
- print "WN: ", type(instance.survey.wallet_number), instance.survey.wallet_number
- number="%02d" % instance.survey.wallet_number + str(instance.survey.wallet_letter) #using %02d string formatting because convention was 2009#01
+ #print "WN: ", type(instance.survey.wallet_number), instance.survey.wallet_number
+ number=str(instance.survey.wallet_number) + str(instance.survey.wallet_letter) #two strings formatting because convention is 2009#01 or 2009#X01
return os.path.join('./',year,year+r'#'+number,instance.contents+str(instance.number_in_wallet)+r'.jpg')
class ScannedImage(TroggleImageModel):