[FIX] website_blog: not include new tags in existing tags list

Before this commit the existing tags list contained the unsaved newly
added tags.

After this commit the existing tags list does not contain the unsaved
newly added tags.

Fixes https://github.com/odoo/odoo/issues/62647

closes odoo/odoo#62829

X-original-commit: 8520a3ef14dd1e79ace1dea70eebeffb4f21f0eb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
Benoit Socias
2020-12-03 13:52:06 +00:00
parent 26a768379d
commit 3902fa5815
@@ -360,7 +360,8 @@ snippetOptions.registry.BlogPostTagSelection = snippetOptions.SnippetOptionWidge
}
const $select = $(uiFragment.querySelector('we-select[data-name="blog_existing_tag_opt"]'));
for (const [key, tag] of Object.entries(this.allTagsByID)) {
if (this.tagIDs.includes(parseInt(key))) {
if (this.tagIDs.includes(parseInt(key)) || this.tagIDs.includes(key)) {
// saved tag keys are numbers, new tag keys are strings
continue;
}
$select.prepend(qweb.render('website_blog.TagSelectItem', {