From 02f55aba0ad3855042561f3dfe60b43a73aa5c23 Mon Sep 17 00:00:00 2001 From: phoenix Date: Thu, 15 Aug 2024 18:57:34 +0700 Subject: [PATCH] fix save prompt --- server/promptadmin_server/api/service/prompt_load_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/promptadmin_server/api/service/prompt_load_service.py b/server/promptadmin_server/api/service/prompt_load_service.py index c17b2ab..a1c614d 100644 --- a/server/promptadmin_server/api/service/prompt_load_service.py +++ b/server/promptadmin_server/api/service/prompt_load_service.py @@ -92,7 +92,7 @@ async def load(connection_name: str, field: str, table: str, field_name: str, na return row[0].get(field, '') async def save(self, prompt: Prompt, user_data: UserData): - mapping = await self.mapping_service.find_by_table_field(prompt.table, prompt.field) + mapping = await self.mapping_service.find_by_id(prompt.mapping_id) conn = await asyncpg.connect(SETTINGS.connections[mapping.connection_name]) await self.prompt_audit_service.save( PromptAudit(