Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattzh72 committed Nov 22, 2024
1 parent 17dd659 commit 737938d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion letta/services/block_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ def create_or_update_block(self, block: Block, actor: PydanticUser) -> PydanticB
self.update_block(block.id, update_data, actor)
else:
with self.session_maker() as session:
# Always write the organization_id
block.organization_id = actor.organization_id
data = block.model_dump(exclude_none=True)
block = BlockModel(**data, organization_id=actor.organization_id)
block = BlockModel(**data)
block.create(session, actor=actor)
return block.to_pydantic()

Expand Down

0 comments on commit 737938d

Please sign in to comment.