Merge pull request #3908 from gdpelican/topic-compat-for-action-summary

Allow compat with ActionSummary for topic model
This commit is contained in:
Régis Hanol 2015-12-01 15:09:26 +01:00
commit a8e69c2fd6
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import RestModel from 'discourse/models/rest';
import { propertyEqual } from 'discourse/lib/computed';
import { longDate } from 'discourse/lib/formatter';
import computed from 'ember-addons/ember-computed-decorators';
import ActionSummary from 'discourse/models/action-summary';
const Topic = RestModel.extend({
message: null,
@ -415,7 +416,7 @@ Topic.reopenClass({
result.actions_summary = result.actions_summary.map(function(a) {
a.post = result;
a.actionType = Discourse.Site.current().postActionTypeById(a.id);
const actionSummary = Discourse.ActionSummary.create(a);
const actionSummary = ActionSummary.create(a);
lookup.set(a.actionType.get('name_key'), actionSummary);
return actionSummary;
});