# User\_flagging\_ratio\_count

**URL:** https://meta.discourse.org/t/user-flagging-ratio-count/117729
**Category:** Bug
**Created:** [May 14, 2019, 6:58pm UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729 "2019-05-14T18:58:54Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [August 6, 2019, 11:21am UTC](https://meta.discourse.org/t/user-flagging-ratio-count/117729/8 "2019-08-06T11:21:45Z")

</div>

I think that should fix it:

> <https://github.com/discourse/discourse/pull/7977>
>
> Without causing a division by zero error

The issue we had is that to prevent some error we had this `HAVING #{disagreed} > #{agreed}` clause which is essentially preventing a lot of results to show.

if you have 5 disagreed and 20 agreed, you wouldn’t show in results. This fix also bumps people with 0 disagreed flags, their score will be agreed^2.

---

_[View the full topic](https://meta.discourse.org/t/user-flagging-ratio-count/117729)._
