Use temporary negative IDs for rows created in a draft Changeset
This commit is contained in:
@@ -79,7 +79,7 @@ class Proposal extends BaseModel
|
||||
throw new NotApplicableException('No changes to propose.');
|
||||
}
|
||||
|
||||
if ($changeset->note == null) {
|
||||
if (empty($changeset->note)) {
|
||||
throw new NotApplicableException('Proposal note must be filled.');
|
||||
}
|
||||
|
||||
@@ -91,6 +91,9 @@ class Proposal extends BaseModel
|
||||
throw new NotApplicableException('Revision not assigned to Changeset');
|
||||
}
|
||||
|
||||
// Assign unique row IDs to new rows (they use temporary negative IDs in a draft)
|
||||
$changeset->renumberRows();
|
||||
|
||||
return new Proposal([
|
||||
// relations
|
||||
'table_id' => $changeset->table->getKey(),
|
||||
|
||||
Reference in New Issue
Block a user