def post(self, request, *args, **kwargs):
        post = request.POST.copy()
        user = request.user if request.user.is_authenticated() else None
        if not wooey_settings.WOOEY_ALLOW_ANONYMOUS and user is None:
            return {'valid': False, 'errors': {'__all__': [force_text(_('You are not permitted to access this script.'))]}}

        form = utils.get_master_form(pk=post['wooey_type'])
        # TODO: Check with people who know more if there's a smarter way to do this
        utils.validate_form(form=form, data=post, files=request.FILES)
        # for cloned jobs, we don't have the files in input fields, they'll be in a list like ['', filename]
        # This will cause issues.
        to_delete = []
        for i in post:
            if isinstance(form.fields.get(i), FileField):
                # if we have a value set, reassert this
                new_values = list(filter(lambda x: x, post.getlist(i)))
                cleaned_values = []
                for new_value in new_values:
                    if i not in request.FILES and (i not in form.cleaned_data or (new_value and (form.cleaned_data[i] is None or not [j for j in form.cleaned_data[i] if j]))):
                        # this is a previously set field, so a cloned job
                        if new_value is not None:
                            cleaned_values.append(utils.get_storage(local=False).open(new_value))
                        to_delete.append(i)
                if cleaned_values:
                    form.cleaned_data[i] = cleaned_values
        for i in to_delete:
            if i in form.errors:
                del form.errors[i]

        # because we can have multiple files for a field, we need to update our form.cleaned_data to be a list of files
        for i in request.FILES:
            v = request.FILES.getlist(i)
            if i in form.cleaned_data:
                cleaned = form.cleaned_data[i]
                cleaned = cleaned if isinstance(cleaned, list) else [cleaned]
                form.cleaned_data[i] = list(set(cleaned).union(set(v)))

        if not form.errors:
            # data = form.cleaned_data
            version_pk = form.cleaned_data.get('wooey_type')
            script_version = ScriptVersion.objects.get(pk=version_pk)
            valid = utils.valid_user(script_version.script, request.user).get('valid')
            if valid is True:
                group_valid = utils.valid_user(script_version.script.script_group, request.user).get('valid')
                if valid is True and group_valid is True:
                    job = utils.create_wooey_job(script_version_pk=version_pk, user=user, data=form.cleaned_data)
                    job.submit_to_celery()
                    return {'valid': True, 'job_id': job.id}

            return {'valid': False, 'errors': {'__all__': [force_text(_('You are not permitted to access this script.'))]}}

        return {'valid': False, 'errors': form.errors}
dataset/ETHPy150Open wooey/Wooey/wooey/views/views.py/WooeyScriptBase.post/original