Bug 22878: Do not pass layout_id on creating a layout
[koha.git] / C4 / Creators / Layout.pm
index f1dc20e..2a689e0 100644 (file)
@@ -165,6 +165,7 @@ sub save {
     }
     else {                      # otherwise create a new record
         my @params;
+        delete $self->{layout_id}; # Could be an empty string
         my $query = "INSERT INTO creator_layouts (";
         foreach my $key (keys %{$self}) {
             push (@params, $self->{$key});