Skip to content

Commit

Permalink
Review markups: always clear ISBNs, not just when type is Chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
rhigman committed Jan 8, 2024
1 parent 3f2d08f commit a35d613
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions thoth-app/src/component/publication_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@ impl Component for PublicationModalComponent {
if let Some(publication) = ctx.props().publication_under_edit.clone() {
// Editing existing publication: load its current values.
self.publication = publication;
}
if ctx.props().work_type == WorkType::BookChapter {
// ISBNs cannot be added for publications whose work type is Book Chapter.
} else {
// Previous values will be retained if creating new publication, which may be
// useful for batch-adding, but this is less likely for ISBNs (and they also
// cannot be added for publications whose work type is Book Chapter).
self.publication.isbn = None;
}
// Ensure ISBN variable value is kept in sync with publication object.
Expand Down

0 comments on commit a35d613

Please sign in to comment.