Open masb3 opened 1 year ago
I will have a look at this.
@tfranzel could we provide any help to get this change into a release. Possibly a PR would help?
We have been using this implementation without issues in production for quite a while.
@tfranzel trying to raise this topic once more - if there is any help I could provide then please let me know. I'd be happy to help with getting this fix in.
Sry this fell off the wagon @madisvain but this is not usable like that (commits on a fork). Please open a proper PR on the main repo. Make sure this is covered by the tests and do not update versions or the changelog, just the GIS change.
I will do a speedy review then.
Describe the bug
GeometryField
inrestframework_gis.serializers.GeoFeatureModelSerializer
with source lookup fails with KeyError indrf_spectacular/contrib/rest_framework_gis.py", line 125, in map_geo_field
. Same issue as https://github.com/tfranzel/drf-spectacular/issues/813 , but serializerGeoFeatureModelSerializer
.To Reproduce
At the moment I fixed by replacing https://github.com/tfranzel/drf-spectacular/blob/ea31d9062ede9e83a01021e7a80c3a7fbbecbad1/drf_spectacular/contrib/rest_framework_gis.py#L125 with
model_field = follow_field_source(serializer.Meta.model, field.source.split('.'))