Bug 10222: Error when saving Demco label templates

This patch fixes a bug whereby if you open either of the
Demco label templates (loaded by the sample data) and
click "save" without making any changes you will get an
error:

Can't bless non-reference value at C4/Creators/Profile.pm
line 92.

It also fixes another minor bug in the creator sample data.

To test:

1. Install all sample data in a clean database.
2. In the label tool, edit either of the Demco label templates.
3. Save the template and observe the error mentioned above.
4. Drop and recreate the database.
5. Apply the patch.
6. Repeate steps 1-3 and note the successful save.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Chris Nighswonger 2015-04-16 12:07:29 -04:00 committed by Jonathan Druart
parent e46ab82e28
commit f8a25307c4

View file

@ -22,7 +22,12 @@ INSERT INTO `creator_templates` VALUES (1,1,'Avery 5160 | 1 x 2-5/8','3 columns,
UNLOCK TABLES;
LOCK TABLES `printers_profile` WRITE;
INSERT INTO `printers_profile` VALUES (1,'Library Laser',1,'Bypass',-2,9,3,0,'POINT','Labels'),(11,'Library Laser',1,'Tray 1',0,0,0,0,'POINT','Labels'),(16,'Test Printer 01',23,'Test Bin',0,0,0,0,'POINT','Patroncards');
INSERT INTO `printers_profile` ( profile_id, printer_name, template_id, paper_bin, offset_horz, offset_vert, creek_horz, creep_vert, units, creator ) VALUES
( 1,'Library Laser', 1,'Bypass', -2,9,3,0,'POINT','Labels'),
(13,'Library Laser', 7,'Tray 1', 0,0,0,0,'POINT','Labels'),
(14,'Library Laser', 12,'Tray 2', 0,0,0,0,'POINT','Labels'),
(16,'Test Printer 01',23,'Test Bin',0,0,0,0,'POINT','Patroncards'),
(22,'Library Laser', 0,'Tray 3', 0,0,0,0,'POINT','Labels');
UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;