<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def post(self, request, format=None):
 """ Add a new Channel. """

        data = request.data.copy()

        # Get chat type record
        try:
            ct = ChatType.objects.get(pk=data.pop("chat_type"))
            data["chat_type"] = ct
        except ChatType.DoesNotExist:
            return typeNotFound404

        if not self.is_path_unique(
            None, data["publish_path"], ct.publish_path
        ):
            return notUnique400

        # Get user record
        try:
            u = User.objects.get(pk=data.pop("owner"))
            data["owner"] = u
        except User.DoesNotExist:
            return userNotFound404

        c = Channel(**data)
        c.save()

        self.handle_webhook(c)

        return Response(
            {
                "text": "Channel saved.",
                "method": "POST",
                "saved": ChannelCMSSerializer(c).data,
            },
            200,
        )