As described on #18896, if we use get_or_create through M2M fields or reverse FK, we can have integrity problems. As there's no obvious solution over here, I'm adding a note into the documentation for it. I also added a couple of tests cases for checking that bug.
Fixes #18896. Add tests verifying that you can get IntegrityErrors us…
…ing get_or_create through relations like M2M, and it also adds a note into the documentation warning about it