Skip to content

Commit c7ef2f6

Browse files
committed
fix(cli): fix dump mass-operation dump-content-model command when the tenant has no Piece.
1 parent 3c956a5 commit c7ef2f6

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

components/cli/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [5.22.1]
6+
7+
- fix dump mass-operation dump-content-model command when the tenant has no Piece.
8+
59
## [5.22.0]
610

711
- added `add-mcp` command to add the Crystallize MCP server to your environment

components/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@crystallize/cli",
3-
"version": "5.22.0",
3+
"version": "5.22.1",
44
"description": "Crystallize CLI",
55
"license": "MIT",
66
"contributors": [

components/cli/src/domain/use-cases/create-content-model-mass-operation.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ const handler = async (envelope: Envelope<Query>, deps: Deps) => {
8989
};
9090
}
9191
data = await client.nextPimApi(jsonToGraphQLQuery({ query }));
92-
for (const edge of data.pieces.edges) {
92+
const pieceEdges = data?.pieces?.edges ?? [];
93+
for (const edge of pieceEdges) {
9394
map[edge.node.identifier] = edge.node.name;
9495
}
9596
cursor = data.pieces.pageInfo.endCursor;

0 commit comments

Comments
 (0)