mysociety / citizenconnect

Citizen Connect project for the NHS: reporting problems, leaving reviews
https://www.nhs.uk/careconnect/choices
Other
1 stars 0 forks source link

Review sending returns immediately if there's an empty organisation #1308

Closed stevenday closed 10 years ago

stevenday commented 10 years ago

When we send reviews, we get a list of organisations with reviews to send, and then check that they haven't already been sent before trying to do so (because deleting sent reviews is done asynchronously in case we need to resend them after some outage or error). However the code that checks this returns immediately when it comes across an organisation that has no reviews which haven't already been sent, causing others to not have their reviews sent in that pass.

The line of code at fault is: https://github.com/mysociety/citizenconnect/blob/master/reviews_submit/management/commands/send_new_reviews_to_choices_api.py#L26 which should be continue, not return.