Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

reverting geojson field in a collection

default discord avatar
kris0x2 years ago
5

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
    2 years ago

    delete your index



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

  • default discord avatar
    kris0x2 years 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
    2 years 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
    kris0x2 years 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
    2 years ago

    absolutely! good work on the fix!

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.