Tag counts not updated when editing a post
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GABlog |
Fix Released
|
Medium
|
Joel Goguen |
Bug Description
I noticed that the list of "Categories" (tags) shown in the 2nd column doesn't behave as expected after a blog post is edited after it's been published. This question isn't about that behavior, but it is about 2 lines of code that I noticed while trying to figure out that issue. What is supposed to happen in the two lines of code isn't clear to me. The two lines below look like the use the same logic, but I think they're supposed to be different. I might not understand what's happening at this point. Thanks again!
http://
http://
484
if not property_
485
before_tags = set(article.
486
after_tags = set(article.
487
for removed_tag in before_tags - after_tags:
=====
Hi, I added a related question just a few minutes ago about two other lines of code in functions.py. I think I found the line of code that might be the spot that is causing some unexpected behavior for tags on article/blog post edits.
http://
If "and article.draft" is removed/commented out, the tag counts are updated as expected. I'm not sure why property_hash would not include draft but the article would be a draft. Thanks for the help!
472
if not property_
473
for key in property_
474
db.
475
if CONFIG[
476
try:
477
do_
478
except Exception, de:
479
logging.
Changed in gablog: | |
milestone: | none → 1.0 |
description: | updated |
Changed in gablog: | |
status: | New → Confirmed |
importance: | Low → Medium |
Changed in gablog: | |
assignee: | nobody → Joel Goguen (jgoguen) |
Changed in gablog: | |
status: | Fix Committed → Fix Released |
Hi Roberto,
Thank you for reporting this issue. The intention here was to avoid counting tags twice (if you submitted a post as a draft, then edited it and saved it as published) but I believe I see that you are correct. I will investigate this further in trunk.