Skip to content

Commit 4d901b6

Browse files
committed
Make credential_id optional in store_credentials fct so
* it only gets passed when provided * reflects the trith of the API where it is optional
1 parent 7f441e6 commit 4d901b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

aries_cloudcontroller/controllers/issuer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,10 @@ async def issue_credential(self, cred_ex_id, comment, attributes):
135135
)
136136

137137
# Store a received credential
138-
async def store_credential(self, cred_ex_id, credential_id):
139-
body = {"credential_id": credential_id}
138+
async def store_credential(self, cred_ex_id, credential_id: str = None):
139+
body = {}
140+
if credential_id:
141+
body['credential_id'] = credential_id
140142
return await self.admin_POST(
141143
f"{self.base_url}/records/{cred_ex_id}/store", json_data=body
142144
)

0 commit comments

Comments
 (0)