Use JsonInclude in BookMetadata to remove nulls

This commit is contained in:
aditya.chandel
2025-01-26 21:19:39 -07:00
parent a94ded10ee
commit a8d1f58c7f
9 changed files with 62 additions and 64 deletions
@@ -46,10 +46,10 @@ export class MetadataSearcherComponent implements OnInit {
this.metadataCenterService.currentMetadata$.subscribe((metadata => {
if (metadata) {
this.bookId = metadata.bookId;
this.form.setValue(({
this.form.patchValue(({
provider: Object.values(MetadataProvider),
isbn: metadata.isbn10,
title: metadata.title,
isbn: metadata.isbn10 || null,
title: metadata.title || null,
author: metadata.authors?.length! > 0 ? metadata.authors[0] : ''
}));
}