mirror of
https://github.com/partitioncloud/partitioncloud-server.git
synced 2025-01-23 17:26:26 +01:00
Suppression des résultats refusés
This commit is contained in:
parent
a7df482f29
commit
1685ea94ce
@ -64,6 +64,7 @@ def online_search(query):
|
|||||||
""",
|
""",
|
||||||
(uuid,)
|
(uuid,)
|
||||||
)
|
)
|
||||||
|
db.commit()
|
||||||
urllib.request.urlretrieve(element, f"partitioncloud/search-partitions/{uuid}.pdf")
|
urllib.request.urlretrieve(element, f"partitioncloud/search-partitions/{uuid}.pdf")
|
||||||
|
|
||||||
os.system(
|
os.system(
|
||||||
@ -79,12 +80,19 @@ def online_search(query):
|
|||||||
"uuid": uuid
|
"uuid": uuid
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
db.commit()
|
|
||||||
break
|
break
|
||||||
except db.IntegrityError:
|
except db.IntegrityError:
|
||||||
pass
|
pass
|
||||||
except urllib.error.HTTPError as e:
|
except urllib.error.HTTPError as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
db.execute(
|
||||||
|
"""
|
||||||
|
DELETE FROM search_results (uuid)
|
||||||
|
VALUES (?)
|
||||||
|
""",
|
||||||
|
(uuid,)
|
||||||
|
)
|
||||||
|
db.commit()
|
||||||
break
|
break
|
||||||
return partitions
|
return partitions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user