Commits

Alan Justino committed 98f2efa

Create key if not found. Then add to entries cache

  • Participants
  • Parent commits 160ad73

Comments (0)

Files changed (1)

File storages/backends/s3boto.py

         if key_name in self.entries:
             return self.entries[key_name]
         else:
-            self.entries[key_name] = self.bucket.new_key(key_name)
+            k = self.bucket.get_key(key_name)
+            self.entries[key_name] = k or self.bucket.new_key(key_name)
 
         return self.entries[key_name]