|
|
@ -82,7 +82,7 @@ def delete_art_entries(url: str, port: int):
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
r = delete_art_by_hash(url, port, md5_hash=arts[i]["hash"])
|
|
|
|
r = delete_art_by_hash(url, port, md5_hash=arts[i]["hash"])
|
|
|
|
|
|
|
|
|
|
|
|
if r is not None and r.status_code != 200:
|
|
|
|
if r.status_code != 200:
|
|
|
|
raise Exception(f"Could not delete the art! {r.status_code}, {r.text}")
|
|
|
|
raise Exception(f"Could not delete the art! {r.status_code}, {r.text}")
|
|
|
|
|
|
|
|
|
|
|
|
print("Deleted art entries: SUCCESS")
|
|
|
|
print("Deleted art entries: SUCCESS")
|
|
|
@ -129,7 +129,7 @@ def delete_art_by_hash(url: str, port: int, md5_hash: str):
|
|
|
|
data = json.loads(str(r1.text))
|
|
|
|
data = json.loads(str(r1.text))
|
|
|
|
art_id = data['id']
|
|
|
|
art_id = data['id']
|
|
|
|
|
|
|
|
|
|
|
|
r = requests.delete(f"http://{url}:{port}/artnet/metadata/art?id={art_id}")
|
|
|
|
r = delete_art_by_id(url, port, art_id=art_id)
|
|
|
|
|
|
|
|
|
|
|
|
return r
|
|
|
|
return r
|
|
|
|
|
|
|
|
|
|
|
|