pad ids to len 7 for storage
This commit is contained in:
parent
28a577d69f
commit
d070cb616b
3 changed files with 4 additions and 3 deletions
|
|
@ -772,6 +772,7 @@ class Item(models.Model):
|
|||
|
||||
def path(self, name=''):
|
||||
h = self.itemId
|
||||
h = (7-len(h))*'0' + h
|
||||
return os.path.join('items', h[:2], h[2:4], h[4:6], h[6:], name)
|
||||
|
||||
'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue