summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Socias <bso@odoo.com>2020-12-02 10:15:23 +0000
committerBenoit Socias <bso@odoo.com>2020-12-02 10:15:46 +0000
commit8520a3ef14dd1e79ace1dea70eebeffb4f21f0eb (patch)
tree70a1112be22816c14c74675993fd7e54161209fa
parent52f3db8ef61d4284d8ea624022bc1355f7f8cf00 (diff)
[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#62722 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
-rw-r--r--addons/website_blog/static/src/js/website_blog.editor.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_blog/static/src/js/website_blog.editor.js b/addons/website_blog/static/src/js/website_blog.editor.js
index fc87a97097e..95daa0fba98 100644
--- a/addons/website_blog/static/src/js/website_blog.editor.js
+++ b/addons/website_blog/static/src/js/website_blog.editor.js
@@ -367,7 +367,8 @@ options.registry.BlogPostTagSelection = options.Class.extend({
}
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', {