DEV: Skip converting local dates as json

This commit is contained in:
Vinoth Kannan
2018-09-17 18:18:43 +05:30
parent 4481836de2
commit b13b6e30d6
2 changed files with 27 additions and 1 deletions

View File

@ -37,7 +37,7 @@ after_initialize do
end
if dates.present?
post.custom_fields[DiscourseLocalDates::POST_CUSTOM_FIELD] = dates.to_json
post.custom_fields[DiscourseLocalDates::POST_CUSTOM_FIELD] = dates
post.save_custom_fields
elsif !post.custom_fields[DiscourseLocalDates::POST_CUSTOM_FIELD].nil?
post.custom_fields.delete(DiscourseLocalDates::POST_CUSTOM_FIELD)