FIX: error when loading admin > flags

This commit is contained in:
Régis Hanol 2015-08-28 12:31:32 +02:00
parent 71c1eccf2b
commit 727827dc25
3 changed files with 3 additions and 1 deletions

View file

@ -32,7 +32,7 @@
<span class="private-message-glyph">{{fa-icon "envelope"}}</span> <span class="private-message-glyph">{{fa-icon "envelope"}}</span>
{{/if}} {{/if}}
{{topic-status topic=flaggedPost.topic}} {{topic-status topic=flaggedPost.topic}}
<a href='{{unbound flaggedPost.url}}'>{{{flaggedPost.topic.fancyTitle}}}</a> <a href='{{unbound flaggedPost.url}}'>{{{unbound flaggedPost.topic.fancyTitle}}}</a>
</h3> </h3>
{{#if flaggedPost.postAuthorFlagged}} {{#if flaggedPost.postAuthorFlagged}}
{{{flaggedPost.excerpt}}} {{{flaggedPost.excerpt}}}

View file

@ -10,6 +10,7 @@ const Topic = RestModel.extend({
@computed('fancy_title') @computed('fancy_title')
fancyTitle(title) { fancyTitle(title) {
title = title || "";
title = Discourse.Emoji.unescape(title); title = Discourse.Emoji.unescape(title);
return Discourse.CensoredWords.censor(title); return Discourse.CensoredWords.censor(title);
}, },

View file

@ -1,6 +1,7 @@
class FlaggedTopicSerializer < ActiveModel::Serializer class FlaggedTopicSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:title, :title,
:fancy_title,
:slug, :slug,
:archived, :archived,
:closed, :closed,