Skip to content

Commit 8900a5f

Browse files
committed
Set the chaincodes package IDs once they are created
To block duplicate package IDs, chaincodes package IDs will be set when they're created. Signed-off-by: dodo920306 <dodo920306@gmail.com>
1 parent 5e2d34b commit 8900a5f

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/api-engine/chaincode/service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ def create_chaincode(
5252
creator=user,
5353
description=description,
5454
)
55-
chaincode.save()
5655
chaincode.peers.add(*peers)
5756

5857
peer_envs = get_peers_root_certs_and_addresses_and_envs(
@@ -88,9 +87,6 @@ def install_chaincode(organization: Organization, chaincode: Chaincode) -> None:
8887
chaincode.peers
8988
)[2]
9089

91-
if chaincode.package_id is None:
92-
_set_chaincode_package_id(peer_envs[0], chaincode)
93-
9490
_install_chaincode_with_envs(peer_envs, chaincode)
9591

9692

0 commit comments

Comments
 (0)