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