A platform for community discussion. Free, open, simple.
FIX: do not automatically infere date type (#6127)
Joffrey JAFFEUX3fdc4f2df116
diff --git a/app/assets/javascripts/admin/models/report.js.es6 b/app/assets/javascripts/admin/models/report.js.es6index cd31cc779a2..566aad01708 100644--- a/app/assets/javascripts/admin/models/report.js.es6+++ b/app/assets/javascripts/admin/models/report.js.es6@@ -61,11 +61,10 @@ const Report = Discourse.Model.extend({formatedValue: number(value)});- if (type !== "string" && type !== "text") {+ if (type === "date") {const date = moment(value, "YYYY-MM-DD");- if (type === "date" || date.isValid()) {+ if (date.isValid()) {return _.assign(base, {- type: "date",formatedValue: date.format("LL")});}