Skip to content

Commit

Permalink
Show the actual filename with extension
Browse files Browse the repository at this point in the history
  • Loading branch information
pehala committed Jan 23, 2024
1 parent 05ecf2a commit 8e8fa5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tenants/menus.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
"""Generates Tenant-specific menus"""
import os

from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import receiver
Expand Down Expand Up @@ -68,7 +70,7 @@ def distinct_requests(request):
):
# pylint: disable=protected-access
if entry.filename not in files and entry.public:
data.append(MenuItem(entry.filename, entry.file.url))
data.append(MenuItem(os.path.basename(entry.file.name), entry.file.url))
files.add(entry.filename)
return data

Expand Down

0 comments on commit 8e8fa5b

Please sign in to comment.