Skip to content

Commit cf3a910

Browse files
authored
Merge pull request #83 from digital-asset/python-ignore-unknown-archives
python: Ignore archive events that correspond to unobserved create events
2 parents a735bc5 + c9d65c6 commit cf3a910

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.7.4
1+
6.7.5

python/dazl/client/state.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,12 @@ def handle_create(self, event: ContractCreateEvent) -> None:
129129
self._queries = [q for q in self._queries if not q.check_ready(self)]
130130

131131
def handle_archive(self, event: ContractArchiveEvent) -> None:
132+
existing_data = self._data.get(event.cid.contract_id)
133+
effective_at = existing_data.effective_at if existing_data is not None else None
132134
self._data[event.cid.contract_id] = ContractContextualData(
133135
cid=event.cid,
134136
cdata=None,
135-
effective_at=self._data[event.cid.contract_id].effective_at,
137+
effective_at=effective_at,
136138
archived_at=event.time,
137139
active=False)
138140

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "dazl"
3-
version = "6.7.4"
3+
version = "6.7.5"
44
description = "high-level Ledger API client for DAML ledgers"
55
license = "Apache-2.0"
66
authors = ["Davin K. Tanabe <[email protected]>"]

0 commit comments

Comments
 (0)