Skip to content

update: override get_url in JSONLDField

Calum Mackervoy requested to merge dynamic-url-fix into master

When debugging locally an issue would occur where the stored and generated urlid's did not match in the response (e.g. when using localhost for the SITE_URL but then visiting by 127.0.0.1, or when testing with Nginx). This is because DRF's rest_framework.HyperlinkedRelatedField.get_url gets the urlid using the request object, and not the one stored on the instance

This is also a minor performance improvement 🎉

Edited by Calum Mackervoy

Merge request reports