fix(python): replace url to public server for forgotten files

This commit is contained in:
ZEROM22
2024-09-09 16:14:11 +03:00
committed by Sergey Linnik
parent 8cf285c51b
commit 814ed51134

View File

@ -48,6 +48,10 @@ def getForgottenFiles():
for key in forgottenList["keys"]:
file = trackManager.commandRequest('getForgotten', key).json()
file["type"] = fileUtils.getFileType(file["url"])
private_url = config_manager.document_server_private_url().geturl()
public_url = config_manager.document_server_public_url().geturl()
if private_url in file["url"]:
file["url"] = file["url"].replace(private_url, public_url)
files.append(file)
except (Exception, ValueError) as error:
logging.error(error)