Question

I have post_save signal set up so that every time a new object gets saved the signal is fired.

The problem is this signal is getting fired even when an existing object is updated. Im updating the object with save() as it says in the django docs but I dont want the signal to get fired when I update.

How do I go around this problem?

I tried to override the save() method like save(force_insert = False, force_update = True) but it dosent work.

Was it helpful?

Solution

This doesn't keep the signal from firing, but you can check for kwargs['created'] inside your post_save signal handler

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top