diff --git a/src/database/adapters/__init__.py b/src/database/adapters/__init__.py index 61bb82ce..70d94df3 100644 --- a/src/database/adapters/__init__.py +++ b/src/database/adapters/__init__.py @@ -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): diff --git a/src/khoj/interface/web/base_config.html b/src/khoj/interface/web/base_config.html index fc1d8a0e..309fdba6 100644 --- a/src/khoj/interface/web/base_config.html +++ b/src/khoj/interface/web/base_config.html @@ -15,7 +15,7 @@ {% import 'utils.html' as utils %} - {{ utils.heading_pane(user_photo, username, is_active) }} + {{ utils.heading_pane(user_photo, username, is_active, has_documents) }}
diff --git a/src/khoj/interface/web/chat.html b/src/khoj/interface/web/chat.html index 7fd054b8..d0f94491 100644 --- a/src/khoj/interface/web/chat.html +++ b/src/khoj/interface/web/chat.html @@ -363,7 +363,7 @@ {% import 'utils.html' as utils %} - {{ utils.heading_pane(user_photo, username, is_active) }} + {{ utils.heading_pane(user_photo, username, is_active, has_documents) }} diff --git a/src/khoj/interface/web/search.html b/src/khoj/interface/web/search.html index 00b378a2..dcd98ede 100644 --- a/src/khoj/interface/web/search.html +++ b/src/khoj/interface/web/search.html @@ -272,7 +272,7 @@ {% import 'utils.html' as utils %} - {{ utils.heading_pane(user_photo, username, is_active) }} + {{ utils.heading_pane(user_photo, username, is_active, has_documents) }} diff --git a/src/khoj/interface/web/utils.html b/src/khoj/interface/web/utils.html index 7b9c99f1..4579368b 100644 --- a/src/khoj/interface/web/utils.html +++ b/src/khoj/interface/web/utils.html @@ -1,11 +1,13 @@ -{% macro heading_pane(user_photo, username, is_active) -%} +{% macro heading_pane(user_photo, username, is_active, has_documents) -%}