def action(self, topic): if not perms.may_stick_topic(self.request.user, topic): raise PermissionDenied topic.sticky = True topic.save()