OpenBazaar-Server icon indicating copy to clipboard operation
OpenBazaar-Server copied to clipboard

Delete contract with delete_items argument fails without warning when image is used in another contract

Open sgornick opened this issue 8 years ago • 0 comments

Using the API, an attempt to DELETE a contract for a listing where the image hash is used in another listing will fail to delete the listing. Yet the request still returns a status 200 / OK.

Operating System (OS and version): Ubuntu OpenBazaar version: Server v0.2.1

Reproducible: Always

Steps to reproduce:

  1. Create a store for testing (since the test script deletes all listings)
  2. Create a listing.
  3. Create another listing that uses the same image. 4.) $ python testdeleteitem.py

Observed Behavior: There are 1 listings remaining.

Expected Behavior: There are 0 listings remaining.

I would expect there to be some error response if the listing could not be deleted.

Additional info: testdeleteitem.py script: https://gist.github.com/sgornick/e6ff5a1072307462b212917959431524#file-testdeleteitem-py, or saved as .txt since github doesn't support .py attachments. testdeleteitem.py.txt

sgornick avatar Jul 13 '16 17:07 sgornick