Skip to content
Snippets Groups Projects
Commit 7a23bb03 authored by Peter Rotich's avatar Peter Rotich
Browse files

upgrade: Support old config storage

Catch InconsistentModelException on config load to allow for fallback to old
config table when upgrade is pending.
parent 942b508d
Branches
Tags
No related merge requests found
......@@ -150,8 +150,19 @@ extends VerySimpleModel {
);
static function items($namespace, $column='namespace') {
return static::objects()
$items = static::objects()
->filter([$column => $namespace]);
try {
count($items);
}
catch (InconsistentModelException $ex) {
// Pending upgrade ??
$items = array();
}
return $items;
}
function save($refetch=false) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment