Skip to content

Commit 2fbcecf

Browse files
adjust rev reg record init process
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
1 parent 8cc9a6f commit 2fbcecf

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

aries_cloudagent/revocation/indy.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ async def init_issuer_registry(
7575

7676
record_id = str(uuid4())
7777
issuer_did = cred_def_id.split(":")[0]
78-
tag = tag or record_id
79-
revoc_reg_id = f"{issuer_did}:4:{cred_def_id}:{revoc_def_type}:{tag}"
8078
record = IssuerRevRegRecord(
8179
new_with_id=True,
8280
record_id=record_id,
8381
cred_def_id=cred_def_id,
8482
issuer_did=issuer_did,
8583
max_cred_num=max_cred_num,
8684
revoc_def_type=revoc_def_type,
87-
revoc_reg_id=revoc_reg_id,
8885
tag=tag,
8986
)
87+
revoc_def_type = record.revoc_def_type
88+
rtag = record.tag or record_id
89+
record.revoc_reg_id = f"{issuer_did}:4:{cred_def_id}:{revoc_def_type}:{rtag}"
9090
async with self._profile.session() as session:
9191
await record.save(session, reason="Init revocation registry")
9292

0 commit comments

Comments
 (0)