mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Revert "Table locking for public_id integrity"
This commit is contained in:
parent
3b1bfe1013
commit
498d7cbca9
@ -27,7 +27,6 @@ class EntityModel extends Eloquent
|
|||||||
$lastEntity = $className::withTrashed()
|
$lastEntity = $className::withTrashed()
|
||||||
->scope(false, $entity->account_id)
|
->scope(false, $entity->account_id)
|
||||||
->orderBy('public_id', 'DESC')
|
->orderBy('public_id', 'DESC')
|
||||||
->lockForUpdate()
|
|
||||||
->first();
|
->first();
|
||||||
|
|
||||||
if ($lastEntity) {
|
if ($lastEntity) {
|
||||||
|
@ -66,8 +66,6 @@ class ClientRepository extends BaseRepository
|
|||||||
{
|
{
|
||||||
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
|
$publicId = isset($data['public_id']) ? $data['public_id'] : false;
|
||||||
|
|
||||||
DB::beginTransaction();
|
|
||||||
|
|
||||||
if (!$publicId || $publicId == '-1') {
|
if (!$publicId || $publicId == '-1') {
|
||||||
$client = Client::createNew();
|
$client = Client::createNew();
|
||||||
} else {
|
} else {
|
||||||
@ -77,9 +75,6 @@ class ClientRepository extends BaseRepository
|
|||||||
$client->fill($data);
|
$client->fill($data);
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
DB::commit();
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ( ! isset($data['contact']) && ! isset($data['contacts'])) {
|
if ( ! isset($data['contact']) && ! isset($data['contacts'])) {
|
||||||
return $client;
|
return $client;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user