[Bps-public-commit] jifty-plugin-recordhistory branch, master, updated. 0.06-3-g7806e1e

Thomas Sibley trs at bestpractical.com
Wed Jun 8 10:14:40 EDT 2011


The branch, master has been updated
       via  7806e1e7aec52fa3af40fae6f1a1b1439b778b68 (commit)
      from  56db7f1c061ff6c8b2cd1fa7a0f62cafcf11a4f8 (commit)

Summary of changes:
 .../RecordHistory/Mixin/Model/RecordHistory.pm     |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 7806e1e7aec52fa3af40fae6f1a1b1439b778b68
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Jun 8 10:13:15 2011 -0400

    We need an id for created_by like everywhere else
    
    Before this fix delete changes weren't getting recorded.

diff --git a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
index cda4bb0..4990521 100644
--- a/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
+++ b/lib/Jifty/Plugin/RecordHistory/Mixin/Model/RecordHistory.pm
@@ -90,7 +90,7 @@ sub import {
 
             my $change = Jifty::Plugin::RecordHistory::Model::Change->new(current_user => Jifty::CurrentUser->superuser);
             $change->create(
-                created_by   => $self->current_user,
+                created_by   => $self->current_user->id,
                 record_class => ref($self),
                 record_id    => $self->id,
                 type         => 'delete',

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list