Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

feat: remove groups selectin on blocks model (#3423)

cthomas96df26fdfe7e
diff --git a/letta/orm/block.py b/letta/orm/block.py
index 40dfcf085..a653eb161 100644
--- a/letta/orm/block.py
+++ b/letta/orm/block.py
@@ -74,7 +74,7 @@ class Block(OrganizationMixin, SqlalchemyBase):
groups: Mapped[List["Group"]] = relationship(
"Group",
secondary="groups_blocks",
- lazy="selectin",
+ lazy="raise",
back_populates="shared_blocks",
passive_deletes=True,
)
diff --git a/letta/serialize_schemas/marshmallow_block.py b/letta/serialize_schemas/marshmallow_block.py
index 6325f2c88..15ff703be 100644
--- a/letta/serialize_schemas/marshmallow_block.py
+++ b/letta/serialize_schemas/marshmallow_block.py
@@ -12,4 +12,4 @@ class SerializedBlockSchema(BaseSchema):
class Meta(BaseSchema.Meta):
model = Block
- exclude = BaseSchema.Meta.exclude + ("agents", "identities", "is_deleted")
+ exclude = BaseSchema.Meta.exclude + ("agents", "identities", "is_deleted", "groups")