use exists instead of iterating over all keys and doing string comparisons
This commit is contained in:
parent
2189fa2580
commit
b09009c252
1 changed files with 1 additions and 1 deletions
|
|
@ -511,7 +511,7 @@ sub set {
|
||||||
#This is necessary for upgrade prior to 7.5.11 in order to ensure that this field exists.
|
#This is necessary for upgrade prior to 7.5.11 in order to ensure that this field exists.
|
||||||
#The if() blocks should be removd once the next branch point is reached.
|
#The if() blocks should be removd once the next branch point is reached.
|
||||||
my $assetVersionTagDesc = $self->session->db->buildHashRef('describe assetVersionTag');
|
my $assetVersionTagDesc = $self->session->db->buildHashRef('describe assetVersionTag');
|
||||||
if(grep { $_ =~ /^startTime/ } keys %{$assetVersionTagDesc}) {
|
if(exists $assetVersionTagDesc->{startTime}) {
|
||||||
#If startTime is there, so is endTime. No need for the additional check.
|
#If startTime is there, so is endTime. No need for the additional check.
|
||||||
$self->{_data}{'startTime' } = $properties->{startTime} || $self->{_data}{startTime} || $startTime;
|
$self->{_data}{'startTime' } = $properties->{startTime} || $self->{_data}{startTime} || $startTime;
|
||||||
$self->{_data}{'endTime' } = $properties->{endTime} || $self->{_data}{endTime} || $endTime;
|
$self->{_data}{'endTime' } = $properties->{endTime} || $self->{_data}{endTime} || $endTime;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue