From 873bdc8c77a944275cd183f1585768c25acb4062 Mon Sep 17 00:00:00 2001
From: Jens Steidl <Jens.Steidl@slub-dresden.de>
Date: Tue, 16 Mar 2021 12:17:38 +0100
Subject: [PATCH] - refactor: remove mods creation, hand over instead

---
 bin/slubsipbuilderbagit.pl | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/slubsipbuilderbagit.pl b/bin/slubsipbuilderbagit.pl
index 247b90b..2e57564 100644
--- a/bin/slubsipbuilderbagit.pl
+++ b/bin/slubsipbuilderbagit.pl
@@ -415,12 +415,13 @@ PATCH
         }
     }
 
-    sub copyFilesToMeta($$$$$){
+    sub copyFilesToMeta($$$$$$){
         my $ppn = $_[0];
         my $noppn = $_[1];
         my $metaPath = $_[2];
         my $rightsFilePath = $_[3];
         my $aRefAddMetaFile = $_[4];
+        my $mods = $_[5];
 
         my @addMetaFile = @{ $aRefAddMetaFile };
 
@@ -449,8 +450,7 @@ PATCH
         }
 
         # mods.xml
-        if (defined $ppn) {
-            my $mods = prepare_mods_section_with_ppn($ppn); # get mods from catalog
+        if ($ppn && $mods) {
             write_file("$metaPath/mods.xml", $mods);
         }
 
-- 
GitLab