View | Details | Raw Unified | Return to bug 33556
Collapse All | Expand All

(-)a/Koha/REST/V1/ERM/Agreements.pm (-8 / +7 lines)
Lines 35-41 use Try::Tiny qw( catch try ); Link Here
35
sub list {
35
sub list {
36
    my $c = shift->openapi->valid_input or return;
36
    my $c = shift->openapi->valid_input or return;
37
37
38
    my $max_expiration_date = delete $c->validation->output->{max_expiration_date};
38
    my $max_expiration_date = $c->param('max_expiration_date');
39
    $c->req->params->remove('max_expiration_date');
39
40
40
    return try {
41
    return try {
41
        my $agreements_set = Koha::ERM::Agreements->new;
42
        my $agreements_set = Koha::ERM::Agreements->new;
Lines 61-68 sub get { Link Here
61
    my $c = shift->openapi->valid_input or return;
62
    my $c = shift->openapi->valid_input or return;
62
63
63
    return try {
64
    return try {
64
        my $agreement_id = $c->validation->param('agreement_id');
65
        my $agreement = $c->objects->find( Koha::ERM::Agreements->search, $c->param('agreement_id') );
65
        my $agreement    = $c->objects->find( Koha::ERM::Agreements->search, $agreement_id );
66
66
67
        unless ($agreement) {
67
        unless ($agreement) {
68
            return $c->render(
68
            return $c->render(
Lines 94-100 sub add { Link Here
94
        Koha::Database->new->schema->txn_do(
94
        Koha::Database->new->schema->txn_do(
95
            sub {
95
            sub {
96
96
97
                my $body = $c->validation->param('body');
97
                my $body = $c->req->json;
98
98
99
                my $periods    = delete $body->{periods} // [];
99
                my $periods    = delete $body->{periods} // [];
100
                my $user_roles = delete $body->{user_roles} // [];
100
                my $user_roles = delete $body->{user_roles} // [];
Lines 169-176 Controller function that handles updating a Koha::ERM::Agreement object Link Here
169
sub update {
169
sub update {
170
    my $c = shift->openapi->valid_input or return;
170
    my $c = shift->openapi->valid_input or return;
171
171
172
    my $agreement_id = $c->validation->param('agreement_id');
172
    my $agreement = Koha::ERM::Agreements->find( $c->param('agreement_id') );
173
    my $agreement = Koha::ERM::Agreements->find( $agreement_id );
174
173
175
    unless ($agreement) {
174
    unless ($agreement) {
176
        return $c->render(
175
        return $c->render(
Lines 183-189 sub update { Link Here
183
        Koha::Database->new->schema->txn_do(
182
        Koha::Database->new->schema->txn_do(
184
            sub {
183
            sub {
185
184
186
                my $body = $c->validation->param('body');
185
                my $body = $c->req->json;
187
186
188
                my $periods    = delete $body->{periods} // [];
187
                my $periods    = delete $body->{periods} // [];
189
                my $user_roles = delete $body->{user_roles} // [];
188
                my $user_roles = delete $body->{user_roles} // [];
Lines 249-255 sub update { Link Here
249
sub delete {
248
sub delete {
250
    my $c = shift->openapi->valid_input or return;
249
    my $c = shift->openapi->valid_input or return;
251
250
252
    my $agreement = Koha::ERM::Agreements->find( $c->validation->param('agreement_id') );
251
    my $agreement = Koha::ERM::Agreements->find( $c->param('agreement_id') );
253
    unless ($agreement) {
252
    unless ($agreement) {
254
        return $c->render(
253
        return $c->render(
255
            status  => 404,
254
            status  => 404,
(-)a/Koha/REST/V1/ERM/Documents.pm (-2 / +1 lines)
Lines 38-47 sub get { Link Here
38
    my $c = shift->openapi->valid_input or return;
38
    my $c = shift->openapi->valid_input or return;
39
39
40
    return try {
40
    return try {
41
        my $document_id = $c->validation->param('document_id');
42
41
43
        # Do not use $c->objects->find here, we need the file_content
42
        # Do not use $c->objects->find here, we need the file_content
44
        my $document = Koha::ERM::Documents->find($document_id);
43
        my $document = Koha::ERM::Documents->find( $c->param('document_id') );
45
44
46
        if ( !$document ) {
45
        if ( !$document ) {
47
            return $c->render(
46
            return $c->render(
(-)a/Koha/REST/V1/ERM/EHoldings/Packages.pm (-6 / +6 lines)
Lines 36-42 use Koha::REST::V1::ERM::EHoldings::Packages::EBSCO; Link Here
36
sub list {
36
sub list {
37
    my $c = shift->openapi->valid_input or return;
37
    my $c = shift->openapi->valid_input or return;
38
38
39
    my $provider = $c->validation->param('provider');
39
    my $provider = $c->param('provider');
40
    if ( $provider eq 'ebsco' ) {
40
    if ( $provider eq 'ebsco' ) {
41
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::list($c);
41
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::list($c);
42
    } else {
42
    } else {
Lines 53-59 Controller function that handles retrieving a single Koha::ERM::EHoldings::Packa Link Here
53
sub get {
53
sub get {
54
    my $c = shift->openapi->valid_input or return;
54
    my $c = shift->openapi->valid_input or return;
55
55
56
    my $provider = $c->validation->param('provider');
56
    my $provider = $c->param('provider');
57
    if ( $provider eq 'ebsco' ) {
57
    if ( $provider eq 'ebsco' ) {
58
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::get($c);
58
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::get($c);
59
    } else {
59
    } else {
Lines 70-76 Controller function that handles adding a new Koha::ERM::EHoldings::Package obje Link Here
70
sub add {
70
sub add {
71
    my $c = shift->openapi->valid_input or return;
71
    my $c = shift->openapi->valid_input or return;
72
72
73
    my $provider = $c->validation->param('provider');
73
    my $provider = $c->param('provider');
74
    if ( $provider && $provider eq 'ebsco' ) {
74
    if ( $provider && $provider eq 'ebsco' ) {
75
        die "invalid action";
75
        die "invalid action";
76
    } else {
76
    } else {
Lines 87-93 Controller function that handles updating a Koha::ERM::EHoldings::Package object Link Here
87
sub update {
87
sub update {
88
    my $c = shift->openapi->valid_input or return;
88
    my $c = shift->openapi->valid_input or return;
89
89
90
    my $provider = $c->validation->param('provider');
90
    my $provider = $c->param('provider');
91
    if ( $provider && $provider eq 'ebsco' ) {
91
    if ( $provider && $provider eq 'ebsco' ) {
92
        die "invalid action";
92
        die "invalid action";
93
    } else {
93
    } else {
Lines 102-108 sub update { Link Here
102
sub delete {
102
sub delete {
103
    my $c = shift->openapi->valid_input or return;
103
    my $c = shift->openapi->valid_input or return;
104
104
105
    my $provider = $c->validation->param('provider');
105
    my $provider = $c->param('provider');
106
    if ( $provider && $provider eq 'ebsco' ) {
106
    if ( $provider && $provider eq 'ebsco' ) {
107
        die "invalid action";
107
        die "invalid action";
108
    } else {
108
    } else {
Lines 119-125 Controller function that handles editing a single Koha::ERM::EHoldings::Package Link Here
119
sub edit {
119
sub edit {
120
    my $c = shift->openapi->valid_input or return;
120
    my $c = shift->openapi->valid_input or return;
121
121
122
    my $provider = $c->validation->param('provider');
122
    my $provider = $c->param('provider');
123
    if ( $provider eq 'ebsco' ) {
123
    if ( $provider eq 'ebsco' ) {
124
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::edit($c);
124
        return Koha::REST::V1::ERM::EHoldings::Packages::EBSCO::edit($c);
125
    } else {
125
    } else {
(-)a/Koha/REST/V1/ERM/EHoldings/Packages/EBSCO.pm (-3 / +3 lines)
Lines 93-99 sub get { Link Here
93
93
94
    return try {
94
    return try {
95
        my ( $vendor_id, $package_id ) = split '-',
95
        my ( $vendor_id, $package_id ) = split '-',
96
          $c->validation->param('package_id');
96
            $c->param('package_id');
97
        my $ebsco = Koha::ERM::Providers::EBSCO->new;
97
        my $ebsco = Koha::ERM::Providers::EBSCO->new;
98
        my $p     = $ebsco->request(
98
        my $p     = $ebsco->request(
99
            GET => '/vendors/' . $vendor_id . '/packages/' . $package_id );
99
            GET => '/vendors/' . $vendor_id . '/packages/' . $package_id );
Lines 124-133 sub edit { Link Here
124
    my $c = shift or return;
124
    my $c = shift or return;
125
125
126
    return try {
126
    return try {
127
        my $body        = $c->validation->param('body');
127
        my $body        = $c->req->json;
128
        my $is_selected = $body->{is_selected};
128
        my $is_selected = $body->{is_selected};
129
        my ( $vendor_id, $package_id ) = split '-',
129
        my ( $vendor_id, $package_id ) = split '-',
130
          $c->validation->param('package_id');
130
            $c->param('package_id');
131
131
132
        my $ebsco = Koha::ERM::Providers::EBSCO->new;
132
        my $ebsco = Koha::ERM::Providers::EBSCO->new;
133
        my $t     = try {
133
        my $t     = try {
(-)a/Koha/REST/V1/ERM/EHoldings/Packages/Local.pm (-8 / +9 lines)
Lines 53-61 sub get { Link Here
53
    my $c = shift or return;
53
    my $c = shift or return;
54
54
55
    return try {
55
    return try {
56
        my $package_id = $c->validation->param('package_id');
56
        my $package_id = $c->param('package_id');
57
        my $package = $c->objects->find( Koha::ERM::EHoldings::Packages->search,
57
        my $package    = $c->objects->find(
58
            $package_id );
58
            Koha::ERM::EHoldings::Packages->search,
59
            $package_id
60
        );
59
61
60
        unless ($package) {
62
        unless ($package) {
61
            return $c->render(
63
            return $c->render(
Lines 87-93 sub add { Link Here
87
        Koha::Database->new->schema->txn_do(
89
        Koha::Database->new->schema->txn_do(
88
            sub {
90
            sub {
89
91
90
                my $body = $c->validation->param('body');
92
                my $body = $c->req->json;
91
93
92
                my $package_agreements = delete $body->{package_agreements} // [];
94
                my $package_agreements = delete $body->{package_agreements} // [];
93
                delete $body->{external_id} unless $body->{external_id};
95
                delete $body->{external_id} unless $body->{external_id};
Lines 149-155 Controller function that handles updating a Koha::ERM::EHoldings::Package object Link Here
149
sub update {
151
sub update {
150
    my $c = shift or return;
152
    my $c = shift or return;
151
153
152
    my $package_id = $c->validation->param('package_id');
154
    my $package_id = $c->param('package_id');
153
    my $package = Koha::ERM::EHoldings::Packages->find( $package_id );
155
    my $package = Koha::ERM::EHoldings::Packages->find( $package_id );
154
156
155
    unless ($package) {
157
    unless ($package) {
Lines 163-169 sub update { Link Here
163
        Koha::Database->new->schema->txn_do(
165
        Koha::Database->new->schema->txn_do(
164
            sub {
166
            sub {
165
167
166
                my $body = $c->validation->param('body');
168
                my $body = $c->req->json;
167
169
168
                my $package_agreements = delete $body->{package_agreements} // [];
170
                my $package_agreements = delete $body->{package_agreements} // [];
169
                delete $body->{external_id} unless $body->{external_id};
171
                delete $body->{external_id} unless $body->{external_id};
Lines 219-225 sub update { Link Here
219
sub delete {
221
sub delete {
220
    my $c = shift or return;
222
    my $c = shift or return;
221
223
222
    my $package = Koha::ERM::EHoldings::Packages->find( $c->validation->param('package_id') );
224
    my $package = Koha::ERM::EHoldings::Packages->find( $c->param('package_id') );
223
    unless ($package) {
225
    unless ($package) {
224
        return $c->render(
226
        return $c->render(
225
            status  => 404,
227
            status  => 404,
Lines 239-243 sub delete { Link Here
239
    };
241
    };
240
}
242
}
241
243
242
243
1;
244
1;
(-)a/Koha/REST/V1/ERM/EHoldings/Resources.pm (-3 / +3 lines)
Lines 36-42 use Try::Tiny qw( catch try ); Link Here
36
sub list {
36
sub list {
37
    my $c = shift->openapi->valid_input or return;
37
    my $c = shift->openapi->valid_input or return;
38
38
39
    my $provider = $c->validation->param('provider');
39
    my $provider = $c->param('provider');
40
    if ( $provider eq 'ebsco' ) {
40
    if ( $provider eq 'ebsco' ) {
41
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::list($c);
41
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::list($c);
42
    } else {
42
    } else {
Lines 53-59 Controller function that handles retrieving a single Koha::ERM::EHoldings::Resou Link Here
53
sub get {
53
sub get {
54
    my $c = shift->openapi->valid_input or return;
54
    my $c = shift->openapi->valid_input or return;
55
55
56
    my $provider = $c->validation->param('provider');
56
    my $provider = $c->param('provider');
57
    if ( $provider eq 'ebsco' ) {
57
    if ( $provider eq 'ebsco' ) {
58
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::get($c);
58
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::get($c);
59
    } else {
59
    } else {
Lines 70-76 Controller function that handles editing a single Koha::ERM::EHoldings::Resource Link Here
70
sub edit {
70
sub edit {
71
    my $c = shift->openapi->valid_input or return;
71
    my $c = shift->openapi->valid_input or return;
72
72
73
    my $provider = $c->validation->param('provider');
73
    my $provider = $c->param('provider');
74
    if ( $provider eq 'ebsco' ) {
74
    if ( $provider eq 'ebsco' ) {
75
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::edit($c);
75
        return Koha::REST::V1::ERM::EHoldings::Resources::EBSCO::edit($c);
76
    } else {
76
    } else {
(-)a/Koha/REST/V1/ERM/EHoldings/Resources/Local.pm (-1 / +1 lines)
Lines 36-42 sub list { Link Here
36
    my $c = shift or return;
36
    my $c = shift or return;
37
37
38
    return try {
38
    return try {
39
        my $package_id = $c->validation->param('package_id');
39
        my $package_id = $c->param('package_id');
40
        my $resources_set =
40
        my $resources_set =
41
          $package_id
41
          $package_id
42
          ? Koha::ERM::EHoldings::Resources->search( { package_id => $package_id } )
42
          ? Koha::ERM::EHoldings::Resources->search( { package_id => $package_id } )
(-)a/Koha/REST/V1/ERM/EHoldings/Titles.pm (-5 / +5 lines)
Lines 36-42 use Koha::REST::V1::ERM::EHoldings::Titles::EBSCO; Link Here
36
sub list {
36
sub list {
37
    my $c = shift->openapi->valid_input or return;
37
    my $c = shift->openapi->valid_input or return;
38
38
39
    my $provider = $c->validation->param('provider');
39
    my $provider = $c->param('provider');
40
    if ( $provider eq 'ebsco' ) {
40
    if ( $provider eq 'ebsco' ) {
41
        return Koha::REST::V1::ERM::EHoldings::Titles::EBSCO::list($c);
41
        return Koha::REST::V1::ERM::EHoldings::Titles::EBSCO::list($c);
42
    } else {
42
    } else {
Lines 53-59 Controller function that handles retrieving a single Koha::ERM::EHoldings::Packa Link Here
53
sub get {
53
sub get {
54
    my $c = shift->openapi->valid_input or return;
54
    my $c = shift->openapi->valid_input or return;
55
55
56
    my $provider = $c->validation->param('provider');
56
    my $provider = $c->param('provider');
57
    if ( $provider eq 'ebsco' ) {
57
    if ( $provider eq 'ebsco' ) {
58
        return Koha::REST::V1::ERM::EHoldings::Titles::EBSCO::get($c);
58
        return Koha::REST::V1::ERM::EHoldings::Titles::EBSCO::get($c);
59
    } else {
59
    } else {
Lines 70-76 Controller function that handles adding a new Koha::ERM::EHoldings::Title object Link Here
70
sub add{
70
sub add{
71
    my $c = shift->openapi->valid_input or return;
71
    my $c = shift->openapi->valid_input or return;
72
72
73
    my $provider = $c->validation->param('provider');
73
    my $provider = $c->param('provider');
74
    if ( $provider && $provider eq 'ebsco' ) {
74
    if ( $provider && $provider eq 'ebsco' ) {
75
        die "invalid action";
75
        die "invalid action";
76
    } else {
76
    } else {
Lines 88-94 Controller function that handles updating a Koha::ERM::EHoldings::Title object Link Here
88
sub update {
88
sub update {
89
    my $c = shift->openapi->valid_input or return;
89
    my $c = shift->openapi->valid_input or return;
90
90
91
    my $provider = $c->validation->param('provider');
91
    my $provider = $c->param('provider');
92
    if ( $provider && $provider eq 'ebsco' ) {
92
    if ( $provider && $provider eq 'ebsco' ) {
93
        die "invalid action";
93
        die "invalid action";
94
    } else {
94
    } else {
Lines 103-109 sub update { Link Here
103
sub delete {
103
sub delete {
104
    my $c = shift->openapi->valid_input or return;
104
    my $c = shift->openapi->valid_input or return;
105
105
106
    my $provider = $c->validation->param('provider');
106
    my $provider = $c->param('provider');
107
    if ( $provider && $provider eq 'ebsco' ) {
107
    if ( $provider && $provider eq 'ebsco' ) {
108
        die "invalid action";
108
        die "invalid action";
109
    } else {
109
    } else {
(-)a/Koha/REST/V1/ERM/EHoldings/Titles/EBSCO.pm (-3 / +2 lines)
Lines 119-127 sub get { Link Here
119
    my $c = shift or return;
119
    my $c = shift or return;
120
120
121
    return try {
121
    return try {
122
        my $title_id = $c->validation->param('title_id');
122
        my $ebsco = Koha::ERM::Providers::EBSCO->new;
123
        my $ebsco    = Koha::ERM::Providers::EBSCO->new;
123
        my $t     = $ebsco->request( GET => '/titles/' . $c->param('title_id') );
124
        my $t        = $ebsco->request( GET => '/titles/' . $title_id );
125
        unless ($t) {
124
        unless ($t) {
126
            return $c->render(
125
            return $c->render(
127
                status  => 404,
126
                status  => 404,
(-)a/Koha/REST/V1/ERM/EHoldings/Titles/Local.pm (-8 / +6 lines)
Lines 57-64 sub get { Link Here
57
    my $c = shift or return;
57
    my $c = shift or return;
58
58
59
    return try {
59
    return try {
60
        my $title_id = $c->validation->param('title_id');
60
        my $title = $c->objects->find( Koha::ERM::EHoldings::Titles->search, $c->param('title_id') );
61
        my $title = $c->objects->find( Koha::ERM::EHoldings::Titles->search, $title_id );
62
61
63
        unless ($title ) {
62
        unless ($title ) {
64
            return $c->render(
63
            return $c->render(
Lines 90-96 sub add { Link Here
90
        Koha::Database->new->schema->txn_do(
89
        Koha::Database->new->schema->txn_do(
91
            sub {
90
            sub {
92
91
93
                my $body = $c->validation->param('body');
92
                my $body = $c->req->json;
94
93
95
                my $resources = delete $body->{resources} // [];
94
                my $resources = delete $body->{resources} // [];
96
95
Lines 152-159 Controller function that handles updating a Koha::ERM::EHoldings::Title object Link Here
152
sub update {
151
sub update {
153
    my $c = shift or return;
152
    my $c = shift or return;
154
153
155
    my $title_id = $c->validation->param('title_id');
154
    my $title = Koha::ERM::EHoldings::Titles->find( $c->param('title_id') );
156
    my $title = Koha::ERM::EHoldings::Titles->find( $title_id );
157
155
158
    unless ($title) {
156
    unless ($title) {
159
        return $c->render(
157
        return $c->render(
Lines 166-172 sub update { Link Here
166
        Koha::Database->new->schema->txn_do(
164
        Koha::Database->new->schema->txn_do(
167
            sub {
165
            sub {
168
166
169
                my $body = $c->validation->param('body');
167
                my $body = $c->req->json;
170
168
171
                my $resources = delete $body->{resources} // [];
169
                my $resources = delete $body->{resources} // [];
172
170
Lines 219-225 sub update { Link Here
219
sub delete {
217
sub delete {
220
    my $c = shift or return;
218
    my $c = shift or return;
221
219
222
    my $title = Koha::ERM::EHoldings::Titles->find( $c->validation->param('title_id') );
220
    my $title = Koha::ERM::EHoldings::Titles->find( $c->param('title_id') );
223
    unless ($title) {
221
    unless ($title) {
224
        return $c->render(
222
        return $c->render(
225
            status  => 404,
223
            status  => 404,
Lines 246-252 sub delete { Link Here
246
sub import_from_list {
244
sub import_from_list {
247
    my $c = shift or return;
245
    my $c = shift or return;
248
246
249
    my $body       = $c->validation->param('body');
247
    my $body       = $c->req->json;
250
    my $list_id    = $body->{list_id};
248
    my $list_id    = $body->{list_id};
251
    my $package_id = $body->{package_id};
249
    my $package_id = $body->{package_id};
252
250
(-)a/Koha/REST/V1/ERM/Licenses.pm (-10 / +6 lines)
Lines 36-43 sub list { Link Here
36
    my $c = shift->openapi->valid_input or return;
36
    my $c = shift->openapi->valid_input or return;
37
37
38
    return try {
38
    return try {
39
        my $licenses_set = Koha::ERM::Licenses->new;
39
        my $licenses = $c->objects->search( Koha::ERM::Licenses->new );
40
        my $licenses = $c->objects->search( $licenses_set );
41
        return $c->render( status => 200, openapi => $licenses );
40
        return $c->render( status => 200, openapi => $licenses );
42
    }
41
    }
43
    catch {
42
    catch {
Lines 56-63 sub get { Link Here
56
    my $c = shift->openapi->valid_input or return;
55
    my $c = shift->openapi->valid_input or return;
57
56
58
    return try {
57
    return try {
59
        my $license_id = $c->validation->param('license_id');
58
        my $license = $c->objects->find( Koha::ERM::Licenses->new, $c->param('license_id') );
60
        my $license    = $c->objects->find( Koha::ERM::Licenses->search, $license_id );
61
59
62
        unless ($license) {
60
        unless ($license) {
63
            return $c->render(
61
            return $c->render(
Lines 89-95 sub add { Link Here
89
        Koha::Database->new->schema->txn_do(
87
        Koha::Database->new->schema->txn_do(
90
            sub {
88
            sub {
91
89
92
                my $body = $c->validation->param('body');
90
                my $body = $c->req->json;
93
91
94
                my $user_roles = delete $body->{user_roles} // [];
92
                my $user_roles = delete $body->{user_roles} // [];
95
                my $documents = delete $body->{documents} // [];
93
                my $documents = delete $body->{documents} // [];
Lines 158-165 Controller function that handles updating a Koha::ERM::License object Link Here
158
sub update {
156
sub update {
159
    my $c = shift->openapi->valid_input or return;
157
    my $c = shift->openapi->valid_input or return;
160
158
161
    my $license_id = $c->validation->param('license_id');
159
    my $license = Koha::ERM::Licenses->find( $c->param('license_id') );
162
    my $license = Koha::ERM::Licenses->find( $license_id );
163
160
164
    unless ($license) {
161
    unless ($license) {
165
        return $c->render(
162
        return $c->render(
Lines 172-178 sub update { Link Here
172
        Koha::Database->new->schema->txn_do(
169
        Koha::Database->new->schema->txn_do(
173
            sub {
170
            sub {
174
171
175
                my $body = $c->validation->param('body');
172
                my $body = $c->req->json;
176
173
177
                my $user_roles = delete $body->{user_roles} // [];
174
                my $user_roles = delete $body->{user_roles} // [];
178
                my $documents = delete $body->{documents} // [];
175
                my $documents = delete $body->{documents} // [];
Lines 232-238 sub update { Link Here
232
sub delete {
229
sub delete {
233
    my $c = shift->openapi->valid_input or return;
230
    my $c = shift->openapi->valid_input or return;
234
231
235
    my $license = Koha::ERM::Licenses->find( $c->validation->param('license_id') );
232
    my $license = Koha::ERM::Licenses->find( $c->param('license_id') );
236
    unless ($license) {
233
    unless ($license) {
237
        return $c->render(
234
        return $c->render(
238
            status  => 404,
235
            status  => 404,
239
- 

Return to bug 33556