You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
)
The text was updated successfully, but these errors were encountered:
kyangmove
changed the title
Could not update item if using range key in the table
Update failed in the new release 1.3.6. Could not update item if updating a table that has range key
Apr 24, 2015
kyangmove
changed the title
Update failed in the new release 1.3.6. Could not update item if updating a table that has range key
Update function stop working in the new release 1.3.6. Could not update item if updating a table that has range key
Apr 24, 2015
kyangmove
changed the title
Update function stop working in the new release 1.3.6. Could not update item if updating a table that has range key
Update function stop working in the new release 1.3.6.
Apr 24, 2015
kyangmove
changed the title
Update function stop working in the new release 1.3.6.
Urgent! Update function stop working in the new release 1.3.6.
Apr 24, 2015
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
)
The text was updated successfully, but these errors were encountered: