Skip to content

Conversation

@jbarreau
Copy link
Contributor

@jbarreau jbarreau commented Apr 2, 2025

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a crash when creating records by ensuring the UUID field is correctly processed based on whether the input value is a string.

  • Adds a type check to convert string values to UUID while leaving others unchanged.
Comments suppressed due to low confidence (1)

src/agent_toolkit/forestadmin/agent_toolkit/resources/collections/crud.py:405

  • Consider adding an additional check to confirm that 'value' is already a valid UUID instance when it's not a string. This can help ensure robust type consistency and prevent potential issues if 'value' is of an unexpected type.
record[field_name] = UUID(value) if isinstance(value, str) else value

@jbarreau jbarreau closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants