Skip to content

Commit f3b2e18

Browse files
authored
Issue #198: Ensure that allow_unpublish is set when upgrading.
Fixes #198.
1 parent f3fc25a commit f3b2e18

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

paragraphs.install

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ function paragraphs_update_1001() {
204204
$bundles[$bundle_object->bundle] = $bundle_object;
205205
}
206206
foreach ($bundles as $bundle) {
207+
if (!property_exists($bundle, 'allow_unpublish')) {
208+
$bundle->allow_unpublish = 0;
209+
}
207210
paragraphs_bundle_save($bundle);
208211
}
209212
db_drop_table('paragraphs_bundle');

0 commit comments

Comments
 (0)