This [Fixes #21] by using a postgres-specific "DISTINCT ON" clause to
return only the first distinct row for a set of columns matching the
previous GROUP BY column set. The new GROUP BY includes "Report_Num"
column. To ensure deterministic behavior, we also must add an ORDER BY
clause like:
ORDER BY [...distinct on columns...], "Report_Num" DESC
See http://stackoverflow.com/a/13327987/910723 for more details.
I manually audited the two affected organizations -- Just Cause and the
Committee to Protect Oakland Renters -- to verify that the new totals
match the most recent report figures only.
https://github.com/caciviclab/disclosure-backend-static/pull/22
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.