无法注册用户 user1.Failed 以获取隶属关系

Failed to register user user1.Failed to get Affiliation

PS C:\Users\OneDrive\Desktop\Final Try\fabcar-blockchain-sample\web-app\server> node registerUser.js
Wallet path: C:\Users\OneDrive\Desktop\Final Try\fabcar-blockchain-sample\web-app\server\wallet
Failed to register user user1: Error: fabric-ca request register failed with errors [[{"code":0,"message":"Registration of 'user1' failed in affiliation validation: Failed getting affiliation 'org1.department1': : scode: 404, code: 63, msg: Failed to get Affiliation: sql: no rows in result set"}]]

**Failed to register user user1.Failed to get Affiliation.Here, in this I'm following the basic Hyperledger faberic Fabcar tutorial. But I'm geting error as failed to Register user user1.msg: Failed to get Affiliation: sql: no rows in result set". The tutorial which I'm following is, https://github.com/IBM/fabcar-blockchain-sample. **

https://github.com/IBM/fabcar-blockchain-sample/blob/master/web-app/server/registerUser.js#L56

如果你改变

const secret = await ca.register({ affiliation: 'org1.department1', enrollmentID: userName, role: 'client' }, adminIdentity);

const secret = await ca.register({ enrollmentID: userName, role: 'client' }, adminIdentity);

那么应该可以了。我认为该演示是为旧版本创建的,我们曾经有内置的从属关系。