[Fixed]-Django: assigning foreign key before target model is saved

7👍

There’s a Django ticket that describes this issue, #8892.

In the meantime, there’s no configuration setting that changes the behaviour. You’ll have to change the order of your save and assignment operations, or do the extra assignment.

Leave a comment