def post(self, request, *args, **kwargs):
        self.init_attachment_cache()

        # Stores a boolean indicating if we are considering a preview
        self.preview = self.request.POST in 'preview'

        # Initializes the forms
        post_form_class = self.get_post_form_class()
        post_form = self.get_post_form(post_form_class)
        attachment_formset_class = self.get_attachment_formset_class()
        attachment_formset = self.get_attachment_formset(attachment_formset_class)

        self.attachment_preview = self.preview if attachment_formset \
            and attachment_formset.is_valid() else None

        post_form_valid = post_form.is_valid()
        if (post_form_valid and attachment_formset is None) or \
                (post_form_valid and attachment_formset.is_valid()):
            return self.form_valid(post_form, attachment_formset)
        else:
            return self.form_invalid(post_form, attachment_formset)
dataset/ETHPy150Open ellmetha/django-machina/machina/apps/forum_conversation/views.py/BasePostFormView.post/swapped operands of `in`