@@ -, +, @@
---
.../prog/en/modules/tools/csv-profiles.tt | 22 +++++++++++++---------
tools/csv-profiles.pl | 3 ++-
2 files changed, 15 insertions(+), 10 deletions(-)
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/csv-profiles.tt
@@ -199,15 +199,19 @@ function reloadPage(p) {
[% IF op == 'delete_confirm' %]
-
Delete CSV Profile "[% csv_profile.profile %]?"
-
-
+ [% IF csv_profile %]
+ Delete CSV Profile "[% csv_profile.profile %]?"
+
+
+ [% ELSE %]
+ This CSV Profile does not exist.
+ [% END %]
[% END %]
--- a/tools/csv-profiles.pl
+++ a/tools/csv-profiles.pl
@@ -82,7 +82,8 @@ if ( $op eq 'add_form' ) {
my $encoding = $input->param("encoding");
if ($export_format_id) {
- my $csv_profile = Koha::CsvProfiles->find($export_format_id);
+ my $csv_profile = Koha::CsvProfiles->find($export_format_id)
+ or die "Something went wrong! This export_format_id does not match any existing CSV profile.";
$csv_profile->profile($profile);
$csv_profile->description($description);
$csv_profile->content($content);
--