Skip to content

Commit

Permalink
Added catch for mapping free_to_read value when the mapped value is 0.
Browse files Browse the repository at this point in the history
Addresses eprintsug#28
Probably due to pre-RIOXX2 eprints that have had embargoes that have expired.
  • Loading branch information
drn05r authored and drn committed Jun 23, 2015
1 parent 3e029db commit f2350ca
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cfg/cfg.d/zz_rioxx2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,11 @@
my( $repo, $value, $eprint ) = @_;

my @problems;
if ( ref($value) ne 'HASH' )
{
push @problems, $repo->html_phrase( "rioxx2_validate_rioxx2_free_to_read:not_done_part_free_to_read" );
return @problems;
}
unless( EPrints::Utils::is_set( $value->{free_to_read} ) )
{
push @problems, $repo->html_phrase( "rioxx2_validate_rioxx2_free_to_read:not_done_part_free_to_read" );
Expand Down

0 comments on commit f2350ca

Please sign in to comment.