FIX: admin reports were broken

This commit is contained in:
Neil Lalonde 2015-12-01 18:31:30 -05:00
parent 6577f3c1ed
commit ddd4500d7a
2 changed files with 3 additions and 2 deletions

View File

@ -147,7 +147,7 @@ Report.reopenClass({
if (maxY > 0) {
json.report.data.forEach(row => row.percentage = Math.round((row.y / maxY) * 100));
}
const model = Discourse.Report.create({ type: type });
const model = Report.create({ type: type });
model.setProperties(json.report);
return model;
});

View File

@ -8,7 +8,8 @@
**/
export default Discourse.Route.extend({
model: function(params) {
return Discourse.Report.find(params.type);
const Report = require('admin/models/report').default;
return Report.find(params.type);
},
setupController: function(controller, model) {