Right now if you Flag a node (for the first time) and then unflag it, the flag_counts table is updated with a count of "0". The problem with that is that nodes that have never been flagged have a count of NULL (since there is no row at all). This causes sorting problems in Views and SQL queries since 0 is ordered before NULL.

Attached are Flag 1 and 2 patches.

CommentFileSizeAuthor
flag_null2.patch2.33 KBquicksketch
flag_null.patch1.62 KBquicksketch

Comments

quicksketch’s picture

Status: Needs review » Fixed

Committed to both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.