diff --git a/storages/backends/gcloud.py b/storages/backends/gcloud.py index 9c7d1574f..730476b8d 100644 --- a/storages/backends/gcloud.py +++ b/storages/backends/gcloud.py @@ -69,7 +69,7 @@ def read(self, num_bytes=None): return super(GoogleCloudFile, self).read(num_bytes) def write(self, content): - if 'w' not in self._mode: + if 'w' not in self._mode and 'r+' not in self._mode: raise AttributeError("File was not opened in write mode.") self._is_dirty = True return super(GoogleCloudFile, self).write(force_bytes(content))