5.8.1 threads are wonky - tests no longer pass with recent DBD::Pg
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index 19364ca..2713869 100644 (file)
@@ -516,12 +516,12 @@ this method.
 sub update {
   my ($self, $upd) = @_;
 
-  my $ident_cond = $self->{_orig_ident} || $self->ident_condition;
-
   $self->set_inflated_columns($upd) if $upd;
-  my %to_update = $self->get_dirty_columns;
-  return $self unless keys %to_update;
 
+  my %to_update = $self->get_dirty_columns
+    or return $self;
+
+  my $ident_cond = $self->{_orig_ident} || $self->ident_condition;
   $self->throw_exception( "Not in database" ) unless $self->in_storage;
 
   $self->throw_exception($self->{_orig_ident_failreason})