django-easy-audit
django-easy-audit copied to clipboard
master branch foreign key constraint on pre-save
I'm still looking into this, but there is an issue when we try to create an object in our unit tests. It looks like it's failing in the pre-save due to a foreign key constraint.
I will be looking into it further tomorrow.
OK. Doesn't seem pre-save related at this point.
But, the issue definitely occurs when all of the latest migrations are applied.
Hi.
This happens when you have an object that has many to many relationships.
In this case, the serializers.serialize(...) call fails.
You can reproduce this by creating a Django instance of a model with many to many relationships and then trying to call serializers.serialize(...) BEFORE you save it.
Let me know if I can help with this.
@KonstantinSchubert thank you for the write up. I'll look into it on my end too to verify, but in the meantime, if you have any recommendations for a solution or a PR to resolve, feel free to send it our way. I'll see if I/we can fix it, too.