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
The updated_resource in handler_update resource type test suite is wrongly deleting the created model in its finally section instead of the potentially updated model.
My resource type is maintaining a Version field on the server with optimistic locking to avoid accidental overwrite of the resource. Upon a successful update, the version is auto-incremented and the new version is returned to the client. The client specifies the version in the If-Match header of the HTTP request, and the server allows the mutation only if the version stored is the same.
I am encountering the same issue. Due to this test, any resource that updates and tracks a remote identifier which is used for retrieving said resource will fail.
The updated_resource in handler_update resource type test suite is wrongly deleting the created model in its
finally
section instead of the potentially updated model.My resource type is maintaining a Version field on the server with optimistic locking to avoid accidental overwrite of the resource. Upon a successful update, the version is auto-incremented and the new version is returned to the client. The client specifies the version in the
If-Match
header of the HTTP request, and the server allows the mutation only if the version stored is the same.In the following function:
The following call to update:
increments the resource version but the delete is made on the original
model
, which in my case, has the previous version, and thus fails:A potential fix, is to update the
model
upon successful update:When trying to delete the resource in the
finally
section now, the rightmodel
is providedThe text was updated successfully, but these errors were encountered: