From c9e6ef1bc313169a91abe1df0564ccd8f46358d2 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 3 Sep 2020 10:37:11 +0200 Subject: Fix document symlink error --- ishtar_common/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ishtar_common/models.py') diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 04ed6d6c0..d26a64e38 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -5779,7 +5779,10 @@ class Document(BaseHistorizedItem, QRCodeItem, OwnPerms, ImageModel, links.append(new_path) if match: # the current link is correct continue - os.symlink(reference_path, new_path) + try: + os.symlink(reference_path, new_path) + except FileExistsError: + pass return links def related_label(self): -- cgit v1.2.3