Fix bug in citekey generation.
This commit is contained in:
parent
09b737b210
commit
443329d7cf
@ -84,12 +84,12 @@ class Repository(object):
|
|||||||
year = article.fields['year']
|
year = article.fields['year']
|
||||||
prefix = '{}{}'.format(first_author.last()[0][:6], year[2:])
|
prefix = '{}{}'.format(first_author.last()[0][:6], year[2:])
|
||||||
|
|
||||||
letter = 0, False
|
letter = 0
|
||||||
citekey = None
|
citekey = None
|
||||||
|
|
||||||
citekey = prefix
|
citekey = prefix
|
||||||
while citekey in self.citekeys and citekey not in allowed:
|
while citekey in self.citekeys and citekey not in allowed:
|
||||||
citekey = prefix + alphabet[letter[0]]
|
citekey = prefix + alphabet[letter]
|
||||||
letter += 1
|
letter += 1
|
||||||
|
|
||||||
return citekey
|
return citekey
|
||||||
@ -97,4 +97,4 @@ class Repository(object):
|
|||||||
def create_number(self):
|
def create_number(self):
|
||||||
count = int(self.papers_config['count'])
|
count = int(self.papers_config['count'])
|
||||||
self.papers_config['count'] = count + 1
|
self.papers_config['count'] = count + 1
|
||||||
return count
|
return count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user