Commit ea9f918a authored by Dane Powell's avatar Dane Powell Committed by borisson_

Issue #2880948 by Dane Powell: Error when running update hook

parent 61d9a9ce
......@@ -53,9 +53,12 @@ function facets_update_8001() {
// Create new source.
unset($as_array['uuid']);
FacetSource::create($as_array)->save();
$existing = FacetSource::load($as_array['id']);
if (!$existing) {
FacetSource::create($as_array)->save();
// Delete old facet source.
$facetsource->delete();
// Delete old facet source.
$facetsource->delete();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment