def post(self, *args, **kwargs):
        if self.action in [
            'search_case_type',
            'search_case_property',
            'search_subcase_property',
            'search_forms',
            'search_form_by_id',
        ]:
            return HttpResponse(json.dumps(getattr(self, '%s_response' % self.action)))
        if self.schedule_form.is_valid():
            self.process_schedule_form()
            return HttpResponseRedirect(reverse(RemindersListView.urlname, args=[self.domain]))
        else:
            messages.error(self.request, "There were errors saving your reminder.")
        return self.get(*args, **kwargs)
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/reminders/views.py/CreateScheduledReminderView.post/original