Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing geom for HD Views in /trek/ APIv2 route #3701

Closed
Chatewgne opened this issue Sep 7, 2023 · 0 comments
Closed

Missing geom for HD Views in /trek/ APIv2 route #3701

Chatewgne opened this issue Sep 7, 2023 · 0 comments
Labels

Comments

@Chatewgne
Copy link
Contributor

geometry from HDViewPointSerializer is failing silently when accessed through /trek/ route

       "view_points": [
           {
               "create_datetime": "2023-08-29T09:23:17.896176Z",
               "update_datetime": "2023-09-07T12:27:51.272475Z",
               "id": 20,
               "annotations":  null,
               "author": "",
               "legend": "",
               "license": null,
               "metadata_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/info/metadata",
               "picture_tiles_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/tiles/%7Bz%7D/%7Bx%7D/%7By%7D.png?source=vips",
               "poi": null,
               "title": "bigff",
               "site": null,
               "trek": {
                   "uuid": "820d9e27-3edc-40c5-93b9-7662387a9150",
                   "id": 396
               },
               "thumbnail_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/data/thumbnail.png?source=vips",
               "uuid": "43f1c4fa-4bfa-415d-9761-2ae876868f0c"
           }
          ]

We need to make sure it is properly serialized as follow

       "view_points": [
           {
               "create_datetime": "2023-08-29T09:23:17.896176Z",
               "update_datetime": "2023-09-07T12:27:51.272475Z",
               "id": 20,
               "annotations":  null,
               "author": "",
               "geometry": {
                   "type": "Point",
                   "coordinates": [
                       3.4409666,
                       44.1214521
                   ]
               },
               "legend": "",
               "license": null,
               "metadata_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/info/metadata",
               "picture_tiles_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/tiles/%7Bz%7D/%7Bx%7D/%7By%7D.png?source=vips",
               "poi": null,
               "title": "bigff",
               "site": null,
               "trek": {
                   "uuid": "820d9e27-3edc-40c5-93b9-7662387a9150",
                   "id": 396
               },
               "thumbnail_url": "http://geotrek.local:8000/api/hdviewpoint/drf/hdviewpoints/20/data/thumbnail.png?source=vips",
               "uuid": "43f1c4fa-4bfa-415d-9761-2ae876868f0c"
           }
          ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant