reverting geojson field in a collection

default discord avatar
kris0x
3 months ago
10

i was testing some stuff and put one of the fields in my collection as "point".. then i reverted the change.. but one of the records was saved with this information..



now when i want to update any element in my collection i get this error:

can't extract geokeys

saving works normally

  • discord user avatar
    jmikrut
    Payload Team
    3 months ago

    delete your index



    it should be recreated automatically when you start server in dev mode

  • default discord avatar
    kris0x
    3 months ago

    can i programatically delete the index from payload somehow ?



    or should i jump into the database and do it from there somehow

  • discord user avatar
    jmikrut
    Payload Team
    3 months ago

    do it in db



    you

    could

    do it programmatically with mongoose but itd be way faster in a db tool like mongo compass

  • default discord avatar
    kris0x
    3 months ago

    thank you, this was fixed



    i am not that strong with mongodb and nosql friends.. luckily payloadcms abstracts this aways very nicely 🫡



    also thank you for such quick response

  • discord user avatar
    jmikrut
    Payload Team
    3 months ago

    absolutely! good work on the fix!

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.