Skip to content

Commit 5296ad3

Browse files
author
Andy Beverley
committed
Fix exception when user result source has relationships defined by code ref
1 parent 7d9c760 commit 5296ad3

File tree

1 file changed

+4
-1
lines changed
  • lib/Dancer2/Plugin/Auth/Extensible/Provider

1 file changed

+4
-1
lines changed

lib/Dancer2/Plugin/Auth/Extensible/Provider/DBIC.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use Moo;
1111
with "Dancer2::Plugin::Auth::Extensible::Role::Provider";
1212
use namespace::clean;
1313

14-
our $VERSION = '0.622';
14+
our $VERSION = '0.623';
1515

1616
=head1 NAME
1717
@@ -522,6 +522,9 @@ sub _build_user_roles_relationship {
522522

523523
foreach my $relname ( $result_source->relationships ) {
524524
my $info = $result_source->relationship_info($relname);
525+
# just check for a simple equality join condition. It could be other
526+
# things (e.g. code ref) but for now this is unsupported.
527+
next unless ref $info->{cond} eq 'HASH';
525528
my %cond = %{ $info->{cond} };
526529
if ( $info->{class} eq $user_roles_class
527530
&& $info->{attrs}->{accessor} eq 'multi'

0 commit comments

Comments
 (0)