Skip to content

Commit 256b2cd

Browse files
Update djangocms_rest/cms_config.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent 4f91903 commit 256b2cd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

djangocms_rest/cms_config.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ def get_file_api_endpoint(file):
3838
"""For a file reference, return the URL of the file if it is public."""
3939
if not file:
4040
return None
41-
if file.is_public:
42-
return file.url
43-
return None
41+
return file.url if file.is_public else None
4442

4543

4644
class RESTToolbarMixin:

0 commit comments

Comments
 (0)