From: Matt S Trout <mst@shadowcat.co.uk>
Date: Sat, 8 Apr 2006 17:43:08 +0000 (+0000)
Subject: fix to update with undefined relations
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b044b5d3118a1a147351cb337a49f788adc7e3be;p=dbsrgits%2FDBIx-Class-Historic.git

fix to update with undefined relations
---

diff --git a/lib/DBIx/Class/Relationship/CascadeActions.pm b/lib/DBIx/Class/Relationship/CascadeActions.pm
index 439cfde..aa88043 100644
--- a/lib/DBIx/Class/Relationship/CascadeActions.pm
+++ b/lib/DBIx/Class/Relationship/CascadeActions.pm
@@ -33,7 +33,7 @@ sub update {
   my %rels = map { $_ => $source->relationship_info($_) } $source->relationships;
   my @cascade = grep { $rels{$_}{attrs}{cascade_update} } keys %rels;
   foreach my $rel (@cascade) {
-    $_->update for $self->$rel;
+    $_->update for grep defined, $self->$rel;
   }
   return $ret;
 }