Skip to content

Commit

Permalink
revert exception for update with empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
maria-rollun committed Oct 4, 2021
1 parent a7aa2c1 commit cae3fb8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/DataStore/src/DataStore/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ protected function updateItem($itemData, $createIfAbsent = false)
$loggedMethod = 'insert';
} elseif ($isExist) {
unset($itemData[$identifier]);
if (empty($itemData)) {
throw new DataStoreException("Can't update item with id = $id because there was only id in request without other fields");
}
$response = $this->dbTable->update($itemData, [$identifier => $id]);
$loggedMethod = 'update';
} else {
Expand Down

0 comments on commit cae3fb8

Please sign in to comment.