fix array length determining and cleanup

This commit is contained in:
Milan
2018-08-31 23:15:57 +02:00
parent 05b1251c1a
commit 3e338758e9
42 changed files with 7588 additions and 7660 deletions

View File

@@ -106,7 +106,7 @@ sub delete_studio {
}
);
unless ( @$studio_assignments == 0 ) {
unless ( scalar @$studio_assignments == 0 ) {
uac::print_info("Studio unassigned from project");
uac::print_warn("Studio is assigned to other projects, so it will not be deleted");
return undef;
@@ -141,7 +141,7 @@ sub save_studio {
studios::update( $config, $entry );
} else {
my $studios = studios::get( $config, { name => $entry->{name} } );
if ( @$studios > 0 ) {
if ( scalar @$studios > 0 ) {
uac::print_error("studio with name '$entry->{name}' already exists");
return;
}
@@ -166,7 +166,7 @@ sub save_studio {
has_single_events => 1
}
);
if ( @$single_series == 0 ) {
if ( scalar @$single_series == 0 ) {
series::insert(
$config,
{