geeksforsocialchange / PlaceCal

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

[Bug]: Address data coming through with null long and lat in geo property #1639

Open katjam opened 1 year ago

katjam commented 1 year ago

Description

Noticed when Trans Dimension builds started failing

Steps to reproduce

Run npm run build on Trans Dimension

What you expected to happen

If there is an address with a postcode, there should also be geo coords

katjam commented 1 year ago

Trans Dimension build error:

I encountered some errors while decoding this JSON:

At path /data/eventsByFilter/275

  Json.Decode.oneOf failed in the following 2 ways:

(1) Problem with the value at json.longitude:

        null

    Expecting a STRING

(2) Problem with the given value:

    {
            "latitude": null,
            "longitude": null
        }

    Expecting null

    {
      "id": "323631",
      "name": "LxZ NYE - the black and gold party",
      "summary": "LxZ NYE - the black and gold party",
      "description": "Seeking a lesbian NYE party in London where you can shake your booty\nsurrounded by queer love in the heart of Central London? Looking to\nmingle with London's finest bisexual, non binary, trans and GNC babes as\nyou see in another year?Get your fine queer ass decked out in black or\ngold (or both. ) and come celebrate the end of another eventful year\nwith the LxZ events family at one of the city's most exciting bar and\nclubs - Core.Set over two floors, this sexy 400 capacity venue will be a\nqueer hotspot of your favourite dance, hiphop, trap, house, R&B\nand UK Garage tracks as we welcome 2023 with a bang.As always, the best\ndressed will win a boozy prize - so get shopping/sorting through your\nparty wardrobe. Our theme this year is blingtastic black and gold.You\ndon't want to miss London's sexiest night of queer glamour, joy and\ncelebration - get those early bird tickets fast before it's too late.\nDJs SizzlesShaynLDN YazMystery DJ This is due to be a sell out event, so\ntell your people and get your tickets before they go and the FOMO\nmonster gets you - he's not pretty… *Dress code: Black and/or Gold -\nbejewelled party dresses, obscenely flashy suits, gold tracksuits - you\ndecide. Just make it gay. \\*Lone Rangers needing party buddies contact\nus to hook you up*Gay boy buddies and trans men always welcome *Tables\navailable for anyone wanting to BALLER it up -\nsparklers/bottles/birthdays etc - contact us for bottle prices \\*No\ntoxic masculinity - we have the right to refuse entry*good vibes only\n\\*No government photographic ID no entry \\*LAST ENTRY 1AM NO REFUNDS -\nunless the event is cancelled",
      "startDate": "2022-12-31T22:00:00+00:00",
      "endDate": "2023-01-01T03:00:00+00:00",
      "publisherUrl": null,
      "address": {
        "streetAddress": "Core Bar, 10-15 Queen Street, London",
        "postalCode": "EC4N 1TY",
        "geo": {
          "latitude": null,
          "longitude": null
        }
      },
      "organizer": {
        "id": "190"
      }
    }
katjam commented 1 year ago

Will address in Trans Dimension (temporarily?) by expecting long and lat to sometimes be null and skipping map render in that case.

https://github.com/GenderedIntelligence/the-trans-dimension/issues/379