Dynamojo 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: Dynamojo
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: ORM For dynamodb
5
5
  Home-page: https://github.com/mathewmoon/dynamojo
6
6
  Author: Mathew Moon
@@ -287,17 +287,18 @@ class DynamojoBase(BaseModel):
287
287
  Deletes an item from the table
288
288
  """
289
289
  key = {
290
- self._config.indexes.table.partitionkey: self.__index_values__[
291
- self._config.indexes.table.partitionkey
292
- ]
290
+ self._config.indexes.table.partitionkey: self.index_attributes()[self._config.indexes.table.partitionkey]
293
291
  }
294
292
 
295
293
  if self._config.indexes.table.is_composite:
296
- key[self._config.indexes.table.sortkey] = self.__index_values__[
297
- self._config.indexes.table.sortkey
298
- ]
294
+ key[self._config.indexes.table.sortkey] = self.index_attributes()[self._config.indexes.table.sortkey]
299
295
 
300
- res = self._config.table.delete_item(Key=key)
296
+ serialized_key = {k: TYPE_SERIALIZER.serialize(v) for k, v in key.items()}
297
+
298
+ res = DYNAMOCLIENT.delete_item(
299
+ Key=serialized_key,
300
+ TableName=self._config.table
301
+ )
301
302
 
302
303
  return res
303
304
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "Dynamojo"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "ORM For dynamodb"
5
5
  authors = ["Mathew Moon <me@mathewmoon.net>"]
6
6
  homepage = "https://github.com/mathewmoon/dynamojo"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes