[Jifty-commit] r4409 - jifty/trunk/lib/Jifty/Action

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Sat Nov 10 03:04:41 EST 2007


Author: gugod
Date: Sat Nov 10 03:04:39 2007
New Revision: 4409

Modified:
   jifty/trunk/lib/Jifty/Action/Record.pm

Log:
When it's a ::Create action, $event_info won't have a record_id
there, cause a fatal error when it's published latter.


Modified: jifty/trunk/lib/Jifty/Action/Record.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Action/Record.pm	(original)
+++ jifty/trunk/lib/Jifty/Action/Record.pm	Sat Nov 10 03:04:39 2007
@@ -478,6 +478,12 @@
     my $self = shift;
     my $event_info = shift;
 
+    unless (defined $event_info->{record_id}) {
+        $event_info->{record_id} = $self->record->id;
+        $event_info->{record_class} = ref($self->record);
+        $event_info->{action_class} = ref($self);
+    }
+
     # Add a few more bits about the result
     $event_info->{result} = $self->result;    
     $event_info->{timestamp} = time(); 


More information about the Jifty-commit mailing list