Fixes SQL query in delete bells by identifier method
I assume that this could cause #712 (closed)
What does this MR do?
delBellsByIdentifier method the foodsavers are queried which see the affected bell to notify them via web socket.
In the join of the query the on clause is missing creating a cross join of the
fs_bell which may can become huge. This causes that the resulting list becomes huge and fs are notified which do not see the bell.
This fix adds a proper on clause and additionally only queries for distinct fs ids.
I would assume that this causes the out of memory exception which causes #712 (closed)
How confident are you it won't break things if deployed?
Very. I'm just not sure why this did not cause any issues earlier or whether I am missing something here.
Links to related issues
- added a test, or explain why one is not needed/possible...
- no unrelated changes
- asked someone for a code review
- joined #foodsharing-beta channel at https://slackin.yunity.org
- added an entry to CHANGELOG.md (description, merge request link, username(s))
- Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings