Closed rgutierrez-cotech closed 4 years ago
I think it's a bug in the receiver function in django-comments-xtd. The receiver should use the model as registered in COMMENTS_XTD_MODEL
, but transformed in the app_label.model form.
You could try to fix it in your own fork by adding the receiver function to your own models.py, the one you point to with COMMENTS_XTD_MODEL
. And replacing the sender with your model class.
Let me know if that fix the problem.
@rgutierrez-cotech, feel free to reopen the issue if you still find issues. I will pack the changes done in the PR #198 in the next release v2.7.1. Meanwhile they are available in master.
That did the trick, thank you!
I had a question about this
publish_or_unpublish_nested_comments
signal.I noticed that it is not firing when I save a comment object with
is_removed=True
andis_public=False
, though I am using a hacked-together API of my own to create and delete comments. I am doingdjango_comments_xtd.get_model()
to get the comment model, then setting is_removed and is_public and finally saving the instance. I am using a custom comments model in my application that extends XtdComment so that is what is getting returned onget_model()
. But the signal is hard-coded to accept XtdComment as the sender. Should the sender instead be the result ofdjango_comments_xtd.get_model()
? Or am I misunderstanding the signal? Should I just use XtdComment instead?The multi-table inheritance thing still takes me a second to understand so I might be missing something