SyntaxFix
Write A Post
Hire A Developer
Questions
You may try this way. just use a function to get your object
def get_object(self, id): try: return Comment.objects.get(pk=id) except Comment.DoesNotExist: return False