Skip to content

Commit

Permalink
Merge pull request #195 from mercedes-benz/hotfix/fix_tablekeypram
Browse files Browse the repository at this point in the history
Fix TableKeyParameter again
  • Loading branch information
andlaus authored Aug 21, 2023
2 parents 4bf54c5 + eb8ac39 commit d58a298
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion odxtools/parameters/tablekeyparameter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: MIT
from dataclasses import dataclass
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, cast
from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple

from ..decodestate import DecodeState
from ..encodestate import EncodeState
Expand Down Expand Up @@ -44,6 +44,7 @@ def _build_odxlinks(self) -> Dict[OdxLinkId, Any]:
def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
super()._resolve_odxlinks(odxlinks)

# Either table_ref or table_row_ref will be defined
if self.table_ref:
if TYPE_CHECKING:
self._table = odxlinks.resolve(self.table_ref, Table)
Expand All @@ -55,6 +56,7 @@ def _resolve_odxlinks(self, odxlinks: OdxLinkDatabase) -> None:
self._table_row = odxlinks.resolve(self.table_row_ref, TableRow)
else:
self._table_row = odxlinks.resolve(self.table_row_ref)
self._table = self._table_row.table

def _resolve_snrefs(self, diag_layer: "DiagLayer") -> None:
super()._resolve_snrefs(diag_layer)
Expand Down

0 comments on commit d58a298

Please sign in to comment.