Skip to content

Commit 47116ee

Browse files
committed
Set the default provide to builtin if undefined on user creation
1 parent 6b1a91b commit 47116ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/GADS.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1820,7 +1820,7 @@ any ['get', 'post'] => '/user/:id' => require_any_role [qw/useradmin superadmin/
18201820
team_id => param('team_id') || undef,
18211821
account_request => param('account_request'),
18221822
account_request_notes => param('account_request_notes'),
1823-
provider => param('provider') || undef,
1823+
provider => param('provider') || 1,
18241824
view_limits => [body_parameters->get_all('view_limits')],
18251825
groups => [body_parameters->get_all('groups')],
18261826
);

lib/GADS/API.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ sub _post_add_user_account
739739
freetext1 => $body->{freetext1},
740740
freetext2 => $body->{freetext2},
741741
title => $body->{title},
742-
provider => $body->{provider},
742+
provider => $body->{provider} || 1,
743743
organisation => $body->{organisation},
744744
department_id => $body->{department_id},
745745
team_id => $body->{team_id},

lib/GADS/Schema/Result/User.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ __PACKAGE__->add_columns(
307307
"debug_login",
308308
{ data_type => "smallint", default_value => 0, is_nullable => 1 },
309309
"provider",
310-
{ data_type => "integer", is_foreign_key => 1, is_nullable => 1 },
310+
{ data_type => "integer", default_value => 1, is_foreign_key => 1, is_nullable => 1 },
311311
);
312312

313313
=head1 PRIMARY KEY

0 commit comments

Comments
 (0)