OpenBazaar-Server
OpenBazaar-Server copied to clipboard
Delete contract with delete_items argument fails without warning when image is used in another contract
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:
- Create a store for testing (since the test script deletes all listings)
- Create a listing.
- 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