fix deleting columns

This commit is contained in:
2018-08-11 21:46:11 +02:00
parent c0bc64a2e7
commit f6109b5d4a
+3 -2
View File
@@ -137,9 +137,10 @@ class Proposal extends BaseModel
'proposal_id' => $this->getKey(),
'note' => $changeset->note,
'row_count' => 0, // Will be set later when we are sure about the row count
'columns' => array_map(function(Column $c) {
'columns' => array_filter(array_map(function(Column $c) {
if ($c->toRemove) return null;
return $c->toArray(false);
}, $columns),
}, $columns)),
]);
$newRevision->save(); // this gives it an ID, needed to associate rows