Skip to content

Commit

Permalink
[FIX] Small fix to reformat the auth option as tuple for protocol web…
Browse files Browse the repository at this point in the history
…dav. It is not possible to specify a tuple in json
  • Loading branch information
wpichler committed Oct 5, 2023
1 parent 59dc531 commit 752f2e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs_storage/models/fs_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ def _get_filesystem(self) -> fsspec.AbstractFileSystem:
options = self.json_options
if self.protocol == "odoofs":
options["odoo_storage_path"] = self._odoo_storage_path
# Webdav protocol handler does need the auth to be a tuple not a list !
if self.protocol == "webdav" and 'auth' in options and isinstance(options['auth'], list):
options['auth'] = tuple(options['auth'])

Check warning on line 319 in fs_storage/models/fs_storage.py

View check run for this annotation

Codecov / codecov/patch

fs_storage/models/fs_storage.py#L319

Added line #L319 was not covered by tests
options = self._recursive_add_odoo_storage_path(options)
fs = fsspec.filesystem(self.protocol, **options)
directory_path = self.directory_path
Expand Down

0 comments on commit 752f2e9

Please sign in to comment.