Skip to content

Commit

Permalink
[FIX] fs_file: url property refers to the filesystem url
Browse files Browse the repository at this point in the history
  • Loading branch information
lmignon committed Sep 29, 2023
1 parent 30f6232 commit 7690d89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion fs_file/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def size(self) -> int:

@property
def url(self) -> str | None:
return self._attachment.url or None if self._attachment else None
return self._attachment.fs_url or None if self._attachment else None

@property
def internal_url(self) -> str | None:
Expand Down
3 changes: 3 additions & 0 deletions fs_file/readme/newsfragments/281.bugfix
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
The *url_path*, *url* and *internal_url* properties on the *FSFileValue*
object return *None* if the information is not available (instead of *False*).

The *url* property on the *FSFileValue* object returns the filesystem url nor
the url field of the attachment.

0 comments on commit 7690d89

Please sign in to comment.