Commit 866d14b
models: Fix invocation of refresh_tag_counts() for Comments
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@malikania.fr>
Fixes: 86172cc ("models: Split Patch into two models")
Closes-bug: #111 ("A/R/T not updated on comments")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>1 parent c4ad0d8 commit 866d14b
1 file changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | 353 | | |
358 | 354 | | |
359 | 355 | | |
| |||
578 | 574 | | |
579 | 575 | | |
580 | 576 | | |
581 | | - | |
| 577 | + | |
| 578 | + | |
582 | 579 | | |
583 | 580 | | |
584 | 581 | | |
585 | | - | |
| 582 | + | |
| 583 | + | |
586 | 584 | | |
587 | 585 | | |
588 | 586 | | |
| |||
0 commit comments