Skip to content

Commit

Permalink
fix: save and replace external IIIF image (DEV-4227)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmastnt committed Dec 16, 2024
1 parent 1f1b80a commit 2fc39f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, Inject } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { KnoraApiConnection } from '@dasch-swiss/dsp-js';
import { ThirdPartyIiifProps, ThirdPartyIiiifForm } from './edit-third-party-iiif-types';

@Component({
Expand All @@ -23,6 +22,7 @@ export class EditThirdPartyIiifFormComponent {

submitData() {
this.loading = true;
delete (this.thirdPartyIiifForm.value.fileValue as any)?.filename;
this.dialogRef.close(this.thirdPartyIiifForm.value.fileValue);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ export class ThirdPartyIiifComponent implements ControlValueAccessor, OnInit, On
updateValue.id = this._initialFileValue.id;
return updateValue;
} else {
return new CreateStillImageExternalFileValue();
const fileValue = new CreateStillImageExternalFileValue();
delete (fileValue as any).filename;
return fileValue;
}
}

Expand Down

0 comments on commit 2fc39f3

Please sign in to comment.