forked from expo/troggle
Fix Scan scanning, so that 2015#X01 format (with 'X') is accepted in
scan directories. Allows 2016 data to be processed.
This commit is contained in:
parent
93d1c330c1
commit
d7b2ddefce
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user