Only show search in web app nav pane if user has documents indexed

This commit is contained in:
Debanjum Singh Solanky
2023-11-09 19:14:33 -08:00
parent c0789dc57b
commit 6eb7df717c
7 changed files with 26 additions and 9 deletions

View File

@@ -371,8 +371,8 @@ class EntryAdapters:
)
@staticmethod
async def user_has_entries(user: KhojUser):
return await Entry.objects.filter(user=user).aexists()
def user_has_entries(user: KhojUser):
return Entry.objects.filter(user=user).exists()
@staticmethod
async def adelete_entry_by_file(user: KhojUser, file_path: str):