Fix find tool filters by mapping many-to-one relations to fieldId (#15716)
**Root Cause** Many-to-one relation filters were being exposed under the relation name (e.g., `company`) instead of the corresponding foreign-key attribute (e.g., `companyId`). **Change** - Detect many-to-one relation metadata and remap those filter keys to `<fieldName>Id`. - Removed some unused code unrelated to this fix.
This commit is contained in:
+2
-5
@@ -7,11 +7,8 @@ export const transformStandardAgentDefinitionToFlatAgent = (
|
||||
standardAgentDefinition: StandardAgentDefinition,
|
||||
workspaceId: string,
|
||||
): FlatAgent => {
|
||||
const {
|
||||
createHandoffFromDefaultAgent: _createHandoffFromDefaultAgent,
|
||||
standardRoleId: _standardRoleId,
|
||||
...agentData
|
||||
} = standardAgentDefinition;
|
||||
const { standardRoleId: _standardRoleId, ...agentData } =
|
||||
standardAgentDefinition;
|
||||
|
||||
return {
|
||||
...agentData,
|
||||
|
||||
Reference in New Issue
Block a user