From 6ea6c7d1d1e5a60aef22a0c6da784e5942e5402c Mon Sep 17 00:00:00 2001 From: Brendan O'Connell Date: Tue, 16 Apr 2024 15:03:03 +0200 Subject: [PATCH] add .clone() to self.series.issn_digital.as_ref() to prevent error, renamed migrations --- thoth-api/migrations/{v0.11.19 => v0.12.2}/down.sql | 0 thoth-api/migrations/{v0.11.19 => v0.12.2}/up.sql | 0 thoth-api/migrations/{v0.11.18 => v0.12.3}/down.sql | 0 thoth-api/migrations/{v0.11.18 => v0.12.3}/up.sql | 0 thoth-export-server/src/marc21/marc21record_thoth.rs | 4 ++-- 5 files changed, 2 insertions(+), 2 deletions(-) rename thoth-api/migrations/{v0.11.19 => v0.12.2}/down.sql (100%) rename thoth-api/migrations/{v0.11.19 => v0.12.2}/up.sql (100%) rename thoth-api/migrations/{v0.11.18 => v0.12.3}/down.sql (100%) rename thoth-api/migrations/{v0.11.18 => v0.12.3}/up.sql (100%) diff --git a/thoth-api/migrations/v0.11.19/down.sql b/thoth-api/migrations/v0.12.2/down.sql similarity index 100% rename from thoth-api/migrations/v0.11.19/down.sql rename to thoth-api/migrations/v0.12.2/down.sql diff --git a/thoth-api/migrations/v0.11.19/up.sql b/thoth-api/migrations/v0.12.2/up.sql similarity index 100% rename from thoth-api/migrations/v0.11.19/up.sql rename to thoth-api/migrations/v0.12.2/up.sql diff --git a/thoth-api/migrations/v0.11.18/down.sql b/thoth-api/migrations/v0.12.3/down.sql similarity index 100% rename from thoth-api/migrations/v0.11.18/down.sql rename to thoth-api/migrations/v0.12.3/down.sql diff --git a/thoth-api/migrations/v0.11.18/up.sql b/thoth-api/migrations/v0.12.3/up.sql similarity index 100% rename from thoth-api/migrations/v0.11.18/up.sql rename to thoth-api/migrations/v0.12.3/up.sql diff --git a/thoth-export-server/src/marc21/marc21record_thoth.rs b/thoth-export-server/src/marc21/marc21record_thoth.rs index 36060c469..88772b139 100644 --- a/thoth-export-server/src/marc21/marc21record_thoth.rs +++ b/thoth-export-server/src/marc21/marc21record_thoth.rs @@ -636,10 +636,10 @@ impl Marc21Field for WorkIssues { }) .and_then(|f| self.series.issn_digital.as_ref() - .map_or(Ok(f), |issn_digital| f.add_subfield(b"x", issn_digital.as_bytes()))) + .map_or(Ok(f.clone()), |issn_digital| f.add_subfield(b"x", issn_digital.as_bytes()))) .and_then(|f| self.series.issn_print.as_ref() - .map_or(Ok(f), |issn_print| f.add_subfield(b"x", issn_print.as_bytes()))) + .map_or(Ok(f.clone()), |issn_print| f.add_subfield(b"x", issn_print.as_bytes()))) .and_then(|f| builder.add_field(f))?; } Ok(())