Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
s3storage
Commits
6efd079d65b5
Commit
91823cbe
authored
Jan 06, 2021
by
Elouan Martinet
Browse files
[storages] Remove S3 key when setting attribute to None
parent
a4a9165d9f59
Pipeline
#28263
passed with stage
in 2 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cubicweb_s3storage/storages.py
View file @
6efd079d
...
...
@@ -74,7 +74,11 @@ class S3Storage(Storage):
return
None
binary
=
entity
.
cw_edited
.
pop
(
attr
)
if
binary
is
not
None
:
if
binary
is
None
:
# remove S3 key
entity
.
cw_edited
.
edited_attribute
(
attr
,
None
)
self
.
entity_deleted
(
entity
,
attr
)
else
:
key
=
self
.
get_s3_key
(
entity
,
attr
)
if
key
is
None
:
key
=
self
.
new_s3_key
(
entity
,
attr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment