Closed gothub closed 4 years ago
Calling PUT /usages/<id> produces this error:
PUT /usages/<id>
{"code":417,"message":"Couldn't update the usage: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint \"usages_quotaid_instanceid_idx\"\n Detail: Key (quotaid, instanceid)=(17, urn:urn:9abc-defj) already exists.
Here is the script making the request:
curl -v -H "Authorization: Bearer ${token}" -X PUT \ --data @${data} \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ "http://localhost:8080/bookkeeper/v1/usages/55"
... and the data:
{ "id":55, "object":"usage", "quotaId":17, "instanceId":"urn:uuid:9abc-defj", "quantity":2.0, "status":"archived", "nodeId":"urn:node:SASAP" }
Fixed in commit d445d75a81dd9ed628d6d6473bca7653d65c9efb
Calling
PUT /usages/<id>
produces this error:Here is the script making the request:
... and the data: