[PATCH 1/2] models: Fix invocation of refresh_tag_counts() for Comments

Stephen Finucane stephen at that.guru
Thu Aug 24 02:21:13 AEST 2017


On Tue, 2017-08-22 at 12:47 +1000, Andrew Donnellan wrote:
> On 21/08/17 00:40, Andrew Donnellan wrote:
> > In Comment.save() and Comment.delete(), we always call
> > Submission.refresh_tag_counts(), which is an empty stub, rather than
> > calling Patch.refresh_tag_counts() if the Submission is a Patch.
> > 
> > As such, tag counts are never updated on incoming comments.
> > 
> > Delete Submission.refresh_tag_counts(), as it's useless, and in
> > Comment.save()/delete(), invoke Patch.refresh_tag_counts() directly when
> > the submission is a Patch.
> > 
> > Reported-by: David Demelier <markand at malikania.fr>
> > Fixes: 86172ccc161b ("models: Split Patch into two models")
> > Closes-bug: #111 ("A/R/T not updated on comments")
> > Signed-off-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> 
> Stephen - is this the last bug that's blocking the release? Happy to 
> look at any other remaining blockers.
> 
> I've pushed this fix to py{2,3}.patchwork.dja.id.au.

Yup, this looks good to me.

Reviewed-by: Stephen Finucane <stephen at that.guru>

Stephen


More information about the Patchwork mailing list