When user tries using the notes slash command without having any data indexed

This commit is contained in:
sabaimran
2023-11-16 12:52:39 -08:00
parent e8a13f0813
commit 118f1143ff
4 changed files with 17 additions and 2 deletions

View File

@@ -374,6 +374,10 @@ class EntryAdapters:
def user_has_entries(user: KhojUser):
return Entry.objects.filter(user=user).exists()
@staticmethod
async def auser_has_entries(user: KhojUser):
return await Entry.objects.filter(user=user).aexists()
@staticmethod
async def adelete_entry_by_file(user: KhojUser, file_path: str):
return await Entry.objects.filter(user=user, file_path=file_path).adelete()