Skip to content

Commit

Permalink
Fixed the dict get value
Browse files Browse the repository at this point in the history
Signed-off-by: Toomore Chiang <[email protected]>
  • Loading branch information
toomore committed Aug 30, 2023
1 parent 654510a commit ebe90ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion module/awsses.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def send_raw_email(self, **kwargs: Any) -> Any:
return self.client.send_raw_email(
RawMessage={'Data': kwargs['data_str']})

data = kwargs.get('data', self.raw_mail(**kwargs))
data = kwargs.get('data')
if data is None:
data = self.raw_mail(**kwargs)

return self.client.send_raw_email(
RawMessage={'Data': data.as_string()})

0 comments on commit ebe90ed

Please sign in to comment.