Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: support `doc_pk` storage path placeholder (#4179)

shamoond1292c59ead1
diff --git a/src/documents/serialisers.py b/src/documents/serialisers.py
index cf636c1d6..4858cfe05 100644
--- a/src/documents/serialisers.py
+++ b/src/documents/serialisers.py
@@ -835,6 +835,7 @@ class StoragePathSerializer(MatchingModelSerializer, OwnedObjectSerializer):
tag_list="tag_list",
owner_username="someone",
original_name="testfile",
+ dock_pk="doc_pk",
)
except KeyError as err:
diff --git a/src/documents/tests/test_api.py b/src/documents/tests/test_api.py
index ee2afc51d..d6bdb593a 100644
--- a/src/documents/tests/test_api.py
+++ b/src/documents/tests/test_api.py
@@ -4463,7 +4463,7 @@ class TestApiStoragePaths(DirectoriesMixin, APITestCase):
"/{created_month_name_short}/{created_day}/{added}/{added_year}"
"/{added_year_short}/{added_month}/{added_month_name}"
"/{added_month_name_short}/{added_day}/{asn}/{tags}"
- "/{tag_list}/",
+ "/{tag_list}/{owner_username}/{original_name}/{dock_pk}/",
},
),
content_type="application/json",