Fix: Langfuse update model has no fields attribute (#6453)

### What problem does this PR solve?

Langfuse update model has no fields attribute

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Yongteng Lei 2025-03-24 15:37:14 +08:00 committed by GitHub
parent 200b6f55c6
commit 66e557b6c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,8 +43,9 @@ class TenantLangfuseService(CommonService):
@classmethod
def update_by_tenant(cls, tenant_id, langfuse_keys):
fields = ["tenant_id", "host", "secret_key", "public_key"]
return cls.model.update(**langfuse_keys).fields(*fields).where(cls.model.tenant_id == tenant_id).execute()
langfuse_keys["update_time"] = current_timestamp()
langfuse_keys["update_date"] = datetime_format(datetime.now())
return cls.model.update(**langfuse_keys).where(cls.model.tenant_id == tenant_id).execute()
@classmethod
def save(cls, **kwargs):