Commit 68cbec10 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

Fix pithos versioning

Do not remove previous object version in case of free versioning policy
parent 3712e32e
......@@ -1331,10 +1331,14 @@ class ModularBackend(BaseBackend):
return 0
path, node = self._lookup_container(account, container)
versioning = self._get_policy(node)['versioning']
if versioning != 'auto' or self.free_versioning:
if versioning != 'auto':
hash, size = self.node.version_remove(version_id)
self.store.map_delete(hash)
return size
elif self.free_versioning:
version_size = self.node.version_lookup(
node, inf, CLUSTER_NORMAL)[3]
return version_size
return 0
# Access control functions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment