pass commit to add_file
This commit is contained in:
parent
acd64d3186
commit
d4e3ba407f
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ def remove_missing():
|
|||
f.move()
|
||||
remove_empty_folders(prefix, True)
|
||||
|
||||
def add_file(id, f, prefix, from_=None):
|
||||
def add_file(id, f, prefix, from_=None, commit=True):
|
||||
user = state.user()
|
||||
path = f[len(prefix):]
|
||||
logger.debug('%s extract metadata %s', id, path)
|
||||
|
@ -68,7 +68,7 @@ def add_file(id, f, prefix, from_=None):
|
|||
item.update_icons()
|
||||
item.modified = datetime.utcnow()
|
||||
logger.debug('%s save item', id)
|
||||
item.update()
|
||||
item.update(commit=commit)
|
||||
logger.debug('%s added', id)
|
||||
return file
|
||||
|
||||
|
|
Loading…
Reference in a new issue