From: Oliver Gorwits Date: Mon, 26 Apr 2010 21:20:20 +0000 (+0000) Subject: simplify previous change, no need to re-retrieve the row because $self is already... X-Git-Tag: v0.900201~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3ef10e3122735252817f61eaaa45b859caea756e;p=dbsrgits%2FDBIx-Class-Journal.git simplify previous change, no need to re-retrieve the row because $self is already in_storage so is what we want --- diff --git a/lib/DBIx/Class/Journal.pm b/lib/DBIx/Class/Journal.pm index 1fcee49..1757e51 100644 --- a/lib/DBIx/Class/Journal.pm +++ b/lib/DBIx/Class/Journal.pm @@ -64,12 +64,10 @@ sub update { sub journal_log_update { my $self = shift; - if($self->in_storage) { + if ($self->in_storage) { my $j = $self->_journal_schema; - my $change_id = $j->journal_create_change->id; - my $prev = $self->result_source->resultset->find( $self->ident_condition ); - $j->journal_record_in_history( $prev, audit_change_id => $change_id ); + $j->journal_record_in_history( $self, audit_change_id => $change_id ); } }