Skip to content

Commit

Permalink
Avoid template bombing if missing from.address field
Browse files Browse the repository at this point in the history
  • Loading branch information
BjarniRunar committed Jul 1, 2015
1 parent 0794773 commit 8f5cbc3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mailpile/www/default/html/partials/search_item.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@
<tr id="pile-message-{{mid}}"
class="result{% for tid in metadata.tag_tids %} in_{{result.data.tags[tid].slug}}{% endfor %}{% if metadata.flags.replied %} replied{% endif %}"
data-state="normal"
{%- if metadata.body.list and
{%- if metadata.body and metadata.body.list and
('list:' + metadata.body.list) not in state.query_args.q %}
data-context-hint="{{ _('View e-mail from this mailing list') }}"
data-context-icon="groups"
data-context-url="{{ U('/search/?q=list:', metadata.body.list) }}"
{%- else %}
{%- if ('from:' + from.address) not in state.query_args.q %}
{%- if from and from.address and
('from:' + from.address) not in state.query_args.q %}
data-context-hint="{{ _('Search for e-mail from:') }} {{metadata.from.fn}}"
data-context-icon="user"
data-context-url="{{ U('/search/?q=from:', from.address) }}"
Expand Down

0 comments on commit 8f5cbc3

Please sign in to comment.