def clean(self, *args, **kwargs):
<EOL>if not self.pk:<EOL><INDENT>node = self.node<EOL>if node.participation_settings.comments_allowed is False:<EOL><INDENT>raise ValidationError("<STR_LIT>")<EOL><DEDENT>if '<STR_LIT>' in settings.INSTALLED_APPS:<EOL><INDENT>layer = node.layer<EOL>if layer.participation_settings.comments_allowed is False:<EOL><INDENT>raise ValidationError("<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>
Check if comments can be inserted for parent node or parent layer