Skip to content

Commit

Permalink
prevent undefined from being fed to sequelize
Browse files Browse the repository at this point in the history
  • Loading branch information
overmode committed Dec 30, 2024
1 parent 5d2f7a9 commit b266112
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions front/lib/resources/agent_message_feedback_resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,11 @@ export class AgentMessageFeedbackResource extends BaseResource<AgentMessageFeedb
// Necessary for global models who share ids across workspaces
workspaceId: workspaceId.toString(),
// These clauses are optional
agentConfigurationId: agentConfiguration?.sId
? agentConfiguration.sId.toString()
: undefined,
...(agentConfiguration
? {
agentConfigurationId: agentConfiguration.sId.toString(),
}
: {}),
...createdAtClause,
},

Expand Down

0 comments on commit b266112

Please sign in to comment.