mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 21:29:11 +00:00
s/aget_all_filenames_by_source/get_all_filenames_by_source as sync func
This commit is contained in:
@@ -796,7 +796,7 @@ class EntryAdapters:
|
||||
return await Entry.objects.filter(user=user, file_path=file_path).adelete()
|
||||
|
||||
@staticmethod
|
||||
def aget_all_filenames_by_source(user: KhojUser, file_source: str):
|
||||
def get_all_filenames_by_source(user: KhojUser, file_source: str):
|
||||
return (
|
||||
Entry.objects.filter(user=user, file_source=file_source)
|
||||
.distinct("file_path")
|
||||
|
||||
@@ -225,7 +225,7 @@ async def get_all_filenames(
|
||||
client=client,
|
||||
)
|
||||
|
||||
return await sync_to_async(list)(EntryAdapters.aget_all_filenames_by_source(user, content_source)) # type: ignore[call-arg]
|
||||
return await sync_to_async(list)(EntryAdapters.get_all_filenames_by_source(user, content_source)) # type: ignore[call-arg]
|
||||
|
||||
|
||||
@api_config.post("/data/conversation/model", status_code=200)
|
||||
|
||||
@@ -120,7 +120,7 @@ async def auth(request: Request):
|
||||
api="create_user",
|
||||
metadata={"user_id": str(khoj_user.uuid)},
|
||||
)
|
||||
logger.log(logging.INFO, f"New User Created: {khoj_user.uuid}")
|
||||
logger.log(logging.INFO, f"🥳 New User Created: {khoj_user.uuid}")
|
||||
return RedirectResponse(url=f"{next_url}", status_code=HTTP_302_FOUND)
|
||||
|
||||
return RedirectResponse(url=f"{next_url}")
|
||||
|
||||
Reference in New Issue
Block a user