geeksforsocialchange / PlaceCal

Bring your community together
https://placecal.org
GNU Affero General Public License v3.0
16 stars 6 forks source link

[Bug]: In `Event.for_site` scope on event model #2431

Closed ivan-kocienski-gfsc closed 5 months ago

ivan-kocienski-gfsc commented 5 months ago

Description

This line assumes every partner has an address, and they do not

Found on staging and 78 partners have no address

Acceptance Criteria

ivan-kocienski-gfsc commented 5 months ago

This line will fix it:

  partner_postcodes: partners.map(&:address).keep_if(&:present?).map { |a| a.postcode.downcase }
katjam commented 5 months ago

Adding to Cycle 30 hotfix milestone as escaped validation

katjam commented 5 months ago

image

image

image

image

katjam commented 5 months ago

Move to cycle 29 following verification. Made assumption that we'd get a 500 if this was still broken as there are lots of partners on staging without addresses.