fix deleting columns
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user