Urgent! Update function stop working in the new release 1.3.6.
Could not update item if the table has range key.
This is in the update_item function. Range key is not passed to kwargs and caused the update failed with error.
(<class 'pynamodb.exceptions.UpdateError'>, UpdateError('Failed to update item: {"__type":"com.amazon.coral.validate#ValidationException","message":"The provided key element does not match the schema"}',), None)
args, _ = self._get_save_args(null_check=False) attribute_cls = None for attr_name, attr_cls in self._get_attributes().items(): if attr_name == attribute: value = attr_cls.serialize(value) attribute_cls = attr_cls break kwargs = {} if len(expected_values): kwargs.update(expected=self._build_expected_values(expected_values, UPDATE_FILTER_OPERATOR_MAP)) kwargs[pythonic(ATTR_UPDATES)] = { attribute: { ACTION: action.upper() if action else None, VALUE: { ATTR_TYPE_MAP[attribute_cls.attr_type]: value } } } kwargs[pythonic(RETURN_VALUES)] = ALL_NEW kwargs.update(conditional_operator=conditional_operator) data = self._get_connection().update_item( _args, *_kwargs )
1.3.5 works fine on update item function