Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve intermittent 422 error in Guided Templates #6034

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export default {
});

const taskData = response.data.data;

if (taskData.length > 0) {
this.task = taskData[0];
this.currentUserId = parseInt(document.head.querySelector('meta[name="user-id"]').content);
Expand Down Expand Up @@ -106,10 +105,12 @@ export default {
const { id: taskId, process_request_id: processRequestId } = task;

try {
await ProcessMaker.apiClient.put(`tasks/${taskId}`, {
status: "COMPLETED",
data: this.formData
});
if (task.advancedStatus !== 'completed') {
await ProcessMaker.apiClient.put(`tasks/${taskId}`, {
status: "COMPLETED",
data: this.formData
});
}

// Successfully completed task, get the next one
await this.getNextTask(processRequestId);
Expand All @@ -126,7 +127,6 @@ export default {
console.error('error', processRequestId);
},
async importProcessTemplate() {
console.log("template", this.template);
const response = await ProcessMaker.apiClient.post(`template/create/process/${this.template.process_template_id}`, {
name: this.template.name,
description: this.template.description,
Expand Down
Loading