Indicia-Team / warehouse

GNU General Public License v3.0
5 stars 3 forks source link

Updating entered_sref with Sample's REST doesn't update geom #524

Open kazlauskis opened 2 months ago

kazlauskis commented 2 months ago

geom and lat/lon values are not updated when updating the entered_sref using the /services/rest/samples endpoint.

POST

{
    "values": {
        "entered_sref": "51, 1",
       //  ... other values
    }
}

GET

{
    "values": {
        "entered_sref": "51, 1",
        "geom": "POINT(111319.49079327357 6621293.722740169)",
        "lat": "51",
        "lon": "0.9999999999999998",
       //  ... other values
    }
}

PUT

{
    "values": {
        "entered_sref": "50, 2"
    }
}

GET

{
    "values": {
        "entered_sref": "50, 2",
        "geom": "POINT(111319.49079327357 6621293.722740169)", // ❌ not updated
        "lat": "51", // ❌ not updated
        "lon": "0.9999999999999998", // ❌ not updated
       //  ... other values

    }
}