Skip to content

Commit

Permalink
fix: 'Error' object does not support item assignment (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler authored Sep 22, 2024
1 parent aa6ee5b commit 4183973
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dank_mids/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def to_dict(self, method: Optional[RPCEndpoint] = None) -> RPCResponse: # type:
continue
if field == "result":
attr = self.decode_result(method=method, _caller=self)
data[field] = AttributeDict(attr) if isinstance(attr, Mapping) and field != "error" else attr # type: ignore [literal-required]
data[field] = AttributeDict(attr) if isinstance(attr, Mapping) else attr # type: ignore [literal-required]
return data

def decode_result(self, method: Optional[RPCEndpoint] = None, _caller = None) -> Union[str, AttributeDict]:
Expand Down

0 comments on commit 4183973

Please sign in to comment.