Open Nosudrum opened 3 months ago
I've successfully solved this issue locally by moving the field type check to line 146 and making it immediately continue
if the field should be ignored. This makes sure the elif line 207 is never entered. I've also added the URLField
class to IGNORED_FIELD_TYPES
.
https://github.com/GeeWee/django-auto-prefetching/blob/a9370a6d70d21eaf583fd547d76a73bb571cf973/django_auto_prefetching/__init__.py#L155
@GeeWee up to you if this is worth a PR or not :)
Hey! I haven't updated (or used!) this project for a while. If you want to submit a PR with the fix and a test I'd be happy to accept it, and see if I can find time to release a new version to PyPi :)
Hello, I am currently trying to implement this package on a fairly large and complex django project, and have the following error message:
When focusing on a ViewSet with a simple serializer, I found that it disappears if I comment out the field that is defined by
image_url = serializers.URLField(source="image.url")
, which usesrest_framework.serializers
. Thatimage
field in the model is defined withmodels.ImageField
fromdjango.db.models
.Can this be an issue in the package, or is there something I am missing on my end ?