BUG: send featuredLink as featured_link to backend to update correct … (#7915)

* BUG: send featuredLink as featured_link to backend to update correct value
https://meta.discourse.org/t/editing-a-topic-link-does-not-change-its-featured-link/123007

* review fix
This commit is contained in:
Saurabh Patel 2019-07-23 19:19:04 +05:30 committed by Robin Ward
parent c4be8541f6
commit 4bc5ccf7e4
1 changed files with 5 additions and 0 deletions

View File

@ -709,6 +709,11 @@ const Composer = RestModel.extend({
const topicProps = this.getProperties(
Object.keys(_edit_topic_serializer)
);
// frontend should have featuredLink but backend needs featured_link
if (topicProps.featuredLink) {
topicProps.featured_link = topicProps.featuredLink;
delete topicProps.featuredLink;
}
const topic = this.topic;