From 96616dbdffdf3c3c3fa28fbcf0b19182e8d6ceae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 6 Jul 2016 16:24:55 +0200 Subject: [PATCH] Always create new nodes on the cloud, and prevent cache issue. The cache issue: this caused etag mismatches when sharing a file multiple times using always_create_new_node=False. Even though we don't use this option right now, it should be easy to enable. --- blender_cloud/image_sharing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/blender_cloud/image_sharing.py b/blender_cloud/image_sharing.py index 0c2c35b..16f64fb 100644 --- a/blender_cloud/image_sharing.py +++ b/blender_cloud/image_sharing.py @@ -144,7 +144,9 @@ class PILLAR_OT_image_share(pillar.PillarOperatorMixin, self.share_group_id, 'image', filename, - extra_where={'user': self.user_id}) + extra_where={'user': self.user_id}, + always_create_new_node=True, + caching=False) self.log.info('Created node %s', node['_id']) self.report({'INFO'}, 'File succesfully uploaded to the cloud!')