Commit 65fa2938 authored by Elouan Martinet's avatar Elouan Martinet
Browse files

[storages] Try to download suffixed keys in precommit events

Since the unsuffixed key is saved in database, a precommit event
fetching an edited attribute doesn't download the new value.
parent e8afdb39b152
Pipeline #31388 passed with stage
in 1 minute and 33 seconds
......@@ -51,6 +51,14 @@ class S3Storage(Storage):
"""see docstring for prototype, which vary according to is_source_callback
key = source.binary_to_str(value).decode('utf-8')
if cnx.commit_state == 'precommit':
# download suffixed key if it exists
# FIXME need a way to check that the attribute is actually edited
suffixed_key = self.suffixed_key(key)
except Exception:
except Exception as ex:
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