From: Matt S Trout Date: Fri, 29 Jul 2005 11:33:41 +0000 (+0000) Subject: Fix to search_realted on relationships without attrs from ningu X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b6e0845b81d5328b534cd8411639607fdc21685;p=dbsrgits%2FDBIx-Class-Historic.git Fix to search_realted on relationships without attrs from ningu --- diff --git a/lib/DBIx/Class/Relationship.pm b/lib/DBIx/Class/Relationship.pm index fc48fdc..04bb4b3e 100644 --- a/lib/DBIx/Class/Relationship.pm +++ b/lib/DBIx/Class/Relationship.pm @@ -70,7 +70,7 @@ sub search_related { } my $rel_obj = $self->_relationships->{$rel}; die "No such relationship ${rel}" unless $rel; - $attrs = { %{$rel_obj->{attrs}}, %{$attrs || {}} }; + $attrs = { %{$rel_obj->{attrs} || {}}, %{$attrs || {}} }; my $s_cond; if (@_) { die "Invalid query: @_" if (@_ > 1 && (@_ % 2 == 1));