[Solved]-Django post_save signal sends outdated inline formsets


The basic problem is that when the main objects post_save signal is sent, the inlines have not been saved yet: the parent model always gets saved first. So, it’s not that it’s sending old data; in fact it’s the current state of the data.

The simplest solution is to create a custom signal and have that signal sent at a place where the inlines have been saved. The save_formset method on ModelAdmin is your hook.

Leave a comment