Exclude read_only=True fields from unique_together validation & add docs. by tomchristie · Pull Request #4192 · encode/django-rest-framework (original) (raw)

punchagan added a commit to akvo/akvo-rsr that referenced this pull request

Nov 15, 2017

@punchagan

`[[](/akvo/akvo-rsr/commit/64c876bd0094c2004fc6c7dd86605cc991fa2eb4 "[#2951] Hack to work around a bug in DRF

unique_together constraint seems to make the fields that are a part of it hidden, even when they are marked as read_only. This commit adds a work around, to fix this bug. Using the patch from https://github.com/encode/django-rest-framework/pull/4192/ didn't seem to work. There are other changes, possibly, that cause this code to not work in the version of DRF we are using.")#2951[] Hack to work around a bug in DRF](/akvo/akvo-rsr/commit/64c876bd0094c2004fc6c7dd86605cc991fa2eb4 "[#2951] Hack to work around a bug in DRF

unique_together constraint seems to make the fields that are a part of it hidden, even when they are marked as read_only. This commit adds a work around, to fix this bug. Using the patch from https://github.com/encode/django-rest-framework/pull/4192/ didn't seem to work. There are other changes, possibly, that cause this code to not work in the version of DRF we are using.") `

[64c876b](/akvo/akvo-rsr/commit/64c876bd0094c2004fc6c7dd86605cc991fa2eb4)

unique_together constraint seems to make the fields that are a part of it hidden, even when they are marked as read_only. This commit adds a work around, to fix this bug. Using the patch from encode/django-rest-framework#4192 didn't seem to work. There are other changes, possibly, that cause this code to not work in the version of DRF we are using.