From 3d6103b1bcb1599a17940c8d4734bbc8bdaf44b8 Mon Sep 17 00:00:00 2001 From: Rui Zhao Date: Thu, 2 Nov 2023 03:26:29 +0000 Subject: [PATCH] fix: Fix crash when create_file called without options (#37) --- src/solid/solid_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/solid/solid_api.py b/src/solid/solid_api.py index 9eda911..343875e 100644 --- a/src/solid/solid_api.py +++ b/src/solid/solid_api.py @@ -158,12 +158,12 @@ def create_folder(self, url, options: WriteOptions = WriteOptions(merge=MERGE.KE return self.post_item(url, '', 'text/turtle', LINK.CONTAINER, options) - def post_file(self, url, content: RequestContent, content_type, options: WriteOptions = None) -> Response: + def post_file(self, url, content: RequestContent, content_type, options: WriteOptions = WriteOptions(create_path=False, with_acl=False)) -> Response: if url[-1] == '/': raise Exception(f'Cannot use postFile to create a folder : ${url}') return self.post_item(url, content, content_type, LINK.RESOURCE, options) - def create_file(self, url, content: RequestContent, content_type, options: WriteOptions = None) -> Response: + def create_file(self, url, content: RequestContent, content_type, options: WriteOptions = WriteOptions(with_acl=False)) -> Response: return self.post_file(url, content, content_type, options) """