Skip to content

Commit

Permalink
Raise error
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed May 2, 2024
1 parent b45bdc3 commit 00d4023
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bindings/python/iota_sdk/types/payload.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,9 @@ class TaggedDataPayload(Payload):
init=True)

def __post_init__(self):
if self.type != int(
PayloadType.TaggedData):
return dacite.UnionMatchError("invalid TaggedDataPayload type", self)
return self
if self.type != PayloadType.TaggedData:
raise dacite.UnionMatchError(
"invalid TaggedDataPayload type", self)


@dataclass
Expand Down

0 comments on commit 00d4023

Please sign in to comment.