Skip to content

Commit

Permalink
Merge pull request #1339 from DalgoT4D/1337-snehas-dbt-tasks-not-bein…
Browse files Browse the repository at this point in the history
…g-added-list-not-getting-refreshed

Rendering issue- dbt seed not being rendered after saving the flow.
  • Loading branch information
fatchat authored Dec 5, 2024
2 parents 39b4408 + deeaeb0 commit 97578ea
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/components/Flows/FlowCreate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,12 @@ const FlowCreate = ({
if (data.transformTasks.length === 0) {
tasksToApply = [];
}

if (
data.transformTasks.length > 0 &&
data.transformTasks.length !== tasksToApply.length
) {
//if "data.transformTasks" and "tasksToApply" are same then the alignment is simple else advanced.
const ifTasksAligned = data.transformTasks.every(
(task: { uuid: string; seq: number }, index: number) =>
task.uuid === tasksToApply[index].uuid
);
if (data.transformTasks.length > 0 && !ifTasksAligned) {
const uuidOrder = data.transformTasks.reduce((acc: any, obj: any) => {
acc[obj.uuid] = obj.seq;
return acc;
Expand Down Expand Up @@ -426,7 +427,7 @@ const FlowCreate = ({
name="tasks"
control={control}
render={({ field }) =>
alignment === 'simple' ? (
alignment === 'simple' ? ( // if its simple
<FormControlLabel
key={field.name}
control={
Expand All @@ -446,7 +447,7 @@ const FlowCreate = ({
label="Run all tasks"
/>
) : (
<TaskSequence field={field} options={tasks} />
<TaskSequence field={field} options={tasks} /> // if advanced is selected
)
}
/>
Expand Down

0 comments on commit 97578ea

Please sign in to comment.