def get_form(self, context): parent_id = None if self.parent: parent_id = self.parent.resolve(context, ignore_failures=True) obj = self.get_object(context) if obj: return comments.get_form()(obj, parent=parent_id) else: return None
def get_form(self, context): obj = self.get_object(context) if obj: return comments.get_form()(obj) else: return None