Comment 3 for bug 793627

Revision history for this message
Dan Scott (denials) wrote :

From IRC, Bill Erickson noted that the problem likely stems from hours of operation not being set for a given library.

One could do something crazy to populate the hours of operation by default, like:

INSERT INTO actor.hours_of_operation (id, dow_0_open, dow_0_close, dow_1_open, dow_1_close, dow_2_open, dow_2_close, dow_3_open, dow_3_close, dow_4_open, dow_4_close, dow_5_open, dow_5_close, dow_6_open, dow_6_close) SELECT id, '05:00'::time, '20:00'::time, '05:00'::time, '20:00'::time,'05:00'::time, '20:00'::time,'05:00'::time, '20:00'::time,'05:00'::time, '20:00'::time,'05:00'::time, '20:00'::time,'05:00'::time, '20:00'::time FROM actor.org_unit;

On the other hand, it would probably be much smarter to just enhance the template to check for a valid set of hours of operation - and if not there, just skip that chunk of the template gracefully, rather than the... ungraceful... alternative.