From b93762fbc5b2cf12844390430a105ed3359a686f Mon Sep 17 00:00:00 2001 From: Andy Beverley Date: Thu, 19 Oct 2023 22:34:54 +0100 Subject: [PATCH] Fix failing test --- lib/GADS/Schema/Result/User.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/GADS/Schema/Result/User.pm b/lib/GADS/Schema/Result/User.pm index 41ebef520..5419ef160 100644 --- a/lib/GADS/Schema/Result/User.pm +++ b/lib/GADS/Schema/Result/User.pm @@ -30,7 +30,7 @@ extends 'DBIx::Class::Core'; =cut -__PACKAGE__->load_components("InflateColumn::DateTime"); +__PACKAGE__->load_components("InflateColumn::DateTime", "+GADS::DBIC"); =head1 TABLE: C @@ -907,8 +907,6 @@ sub update_user $params{permissions} = [] if exists $params{permissions} && !$params{permissions}; - $params{value} = _user_value(\%params); - $values->{value} = _user_value($values); $self->update($values); $self->groups($current_user, $params{groups}) @@ -1140,6 +1138,11 @@ sub for_data_table $return; } +sub validate +{ my $self = shift; + $self->value(_user_value({firstname => $self->firstname, surname => $self->surname})); +} + sub export_hash { my $self = shift; # XXX Department, organisation etc not currently exported