Reverted previous unitentional change to Accessor.pm
Nigel Metheringham [Fri, 24 Feb 2006 12:16:06 +0000 (12:16 +0000)]
lib/DBIx/Class/Relationship/Accessor.pm

index c404c32..b94f238 100644 (file)
@@ -39,8 +39,7 @@ sub add_relationship_accessor {
         },
         deflate => sub {
           my ($val, $self) = @_;
-          $self->throw_exception("$val isn't a $f_class")
-            unless $val->isa($self->result_source->schema->class($f_class));
+          $self->throw_exception("$val isn't a $f_class") unless $val->isa($f_class);
           return ($val->_ident_values)[0];
             # WARNING: probably breaks for multi-pri sometimes. FIXME
         }