Merge branch 'fix_storage_crash' into 'master'

fix modpol storage of old_ledgers

See merge request medlabboulder/modpol!10
This commit is contained in:
2021-03-10 07:09:16 +00:00

View File

@ -133,14 +133,14 @@ local load_old_ledgers = function()
if obj ~= nil then
local func, err = load (obj)
if err then
modpol.ocutil.fatal_error ("load_data: orgs" )
modpol.ocutil.fatal_error ("load_data: old_ledgers" )
end
modpol.orgs = func()
modpol.old_ledgers = func()
local nn = modpol.ocutil.table_length (modpol.old_ledgers)
local str = "entries"
if nn == 1 then str = "entry" end
modpol.ocutil.log (nn .. " orgs loaded from disk")
modpol.ocutil.log (nn .. " old ledgers loaded from disk")
else
modpol.ocutil.log ("No stored old ledgers data found")
end