FIX: do not update tag name on /tags/intersection

This commit is contained in:
Arpit Jalan 2019-02-26 16:42:49 +05:30
parent 1cee8a86f6
commit 6ea9f5c9c5
2 changed files with 3 additions and 3 deletions

View File

@ -109,7 +109,7 @@ export default Discourse.Route.extend({
params,
{}
).then(list => {
if (list.topic_list.tags) {
if (list.topic_list.tags && list.topic_list.tags.length === 1) {
tag.set("id", list.topic_list.tags[0].name); // Update name of tag (case might be different)
}
controller.setProperties({

View File

@ -19,8 +19,8 @@ acceptance("Tags intersection", {
draft_key: "new_topic",
topics: [{ id: 16, posters: [] }],
tags: [
{ id: 1, name: "first", topic_count: 1 },
{ id: 2, name: "second", topic_count: 1 }
{ id: 1, name: "second", topic_count: 1 },
{ id: 2, name: "first", topic_count: 1 }
]
}
});