openwisp / django-rest-framework-gis

Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.
http://openwisp.org
MIT License
1.07k stars 200 forks source link

[fix] Deserialize id_field #272 #273

Closed restaste closed 2 years ago

restaste commented 2 years ago

When serializing a model, the value of its id_field is written in the id attribute of the GeoJSON feature.

This behaviour is however not mirrored by the deserialization logic: deserializing a model through GeoFeatureModelSerializer ignores the id field set in the given GeoJSON feature.

This commit solves this issue by mirroring the serialization logic:

Fixes #272

restaste commented 2 years ago

What I don't understand is that the coverage report for the coveralls job that reports -10.8% coverage change also shows a +0.02% coverage change when viewing the actual report.

Another thing I'm not sure I understand is that all recent coveralls builds seem to be made of 21 jobs, which is consistent with the 21 checks we have here, but this branch's build has 41 of those jobs. Is that expected because of the retry?

Finally, that failing coverage report appears to be linked to the py37-django22-djangorestframework310 configuration, so maybe this PR actually breaks something in that particular configuration?