Skip to content

Commit

Permalink
$sequence was overwritten, wrong returning id was used (#17570)
Browse files Browse the repository at this point in the history
  • Loading branch information
TiborJaszi authored and taylorotwell committed Jan 26, 2017
1 parent f8fb857 commit d341e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Query/Grammars/PostgresGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ protected function compileLock(Builder $query, $value)
*/
public function compileInsertGetId(Builder $query, $values, $sequence)
{
if (! is_null($sequence)) {
if (is_null($sequence)) {
$sequence = 'id';
}

Expand Down

0 comments on commit d341e4f

Please sign in to comment.