mirror of
https://github.com/tubearchivist/tubearchivist-frontend.git
synced 2024-11-22 11:50:14 +00:00
skip post_bulk_restore if empty
This commit is contained in:
parent
4b9acd4c51
commit
c17e2e6dd1
@ -481,6 +481,9 @@ class ElasticBackup:
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
query_str = f.read()
|
||||
|
||||
if not query_str.strip():
|
||||
return
|
||||
|
||||
url = es_url + '/_bulk'
|
||||
request = requests.post(url, data=query_str, headers=headers)
|
||||
if not request.ok:
|
||||
|
Loading…
Reference in New Issue
Block a user