Skip to content

Commit

Permalink
Possible fix for schedule saving crash
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Jan 17, 2025
1 parent b3f5564 commit 5ec351a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app/marathon/schedule-management/edit/edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,18 @@ export class EditComponent implements OnInit, OnDestroy {

try {
this.loading = true;
await firstValueFrom(
this.scheduleInfo = await firstValueFrom(
this.scheduleService.updateSchedule(this.marathonId, this.scheduleInfo.id, this.scheduleInfo),
);

await firstValueFrom(
const { data: newLines } = await firstValueFrom(
this.scheduleService.updateLines(
this.marathonId, this.scheduleInfo.id, this.lines,
)
);

this.lines = newLines;

this.translateService.get('alert.schedule.save.success').subscribe((res: string) => {
const alertConfig: NwbAlertConfig = {
message: res,
Expand Down

0 comments on commit 5ec351a

Please sign in to comment.