before_tags and after_tags

Asked by Roberto R

Hi,

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://bazaar.launchpad.net/~jgoguen/gablog/trunk/view/head:/handlers/functions.py#L485
http://bazaar.launchpad.net/~jgoguen/gablog/trunk/view/head:/handlers/functions.py#L486

484
  if not property_hash["draft"]:
485
   before_tags = set(article.tag_keys)
486
   after_tags = set(article.tag_keys)
487
   for removed_tag in before_tags - after_tags:

Question information

Language:
English Edit question
Status:
Solved
For:
GABlog Edit question
Assignee:
Joel Goguen Edit question
Last query:
Last reply:
Revision history for this message
Joel Goguen (jgoguen) said :
#1

There's more to this than just a silly mistake. This is part of a larger problem in process_article_edit that prevents tag counts from being updated under various circumstances. Linking bug 711831 to this; everything will be tracked there.

Revision history for this message
Joel Goguen (jgoguen) said :
#2

Taken care of with bug 711831