[Fixed]-ReverseOneToOne not evaluated in django signal

1👍

sender is the class that the signal is attached to, not the instance that is being saved. That is in kwargs['instance'], or you could accept the arguments directly:

def clear_cache(sender, instance, created, **kwargs):
    print(instance.article_content.pk)

Leave a comment