|
|
|
@ -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 |
|
|
|
|