Skip to content

Commit

Permalink
handle empty styles
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed May 17, 2024
1 parent abbc1ac commit d95cb58
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rer/newsletter/browser/message/messagepreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ def getMessageStyle(self):
if isinstance(obj, Channel):
channel = obj
break
return DEFAULT_STYLES + channel.css_style
if not channel:
return DEFAULT_STYLES
return DEFAULT_STYLES + getattr(channel, "css_style", "")

@property
def channel(self):
Expand Down

0 comments on commit d95cb58

Please sign in to comment.