Skip to content

Commit

Permalink
fix defining services ids
Browse files Browse the repository at this point in the history
  • Loading branch information
avkhozov committed Aug 21, 2023
1 parent 9e0a731 commit 4f21aa3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/CS/Command/init_db.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sub run {
host => delete $team->{host},
token => delete $team->{token}
};
$values->{id} = delete $team->{id} if $team->{id};
$values->{id} = delete $team->{id} if defined $team->{id};
my $details = {details => {-json => $team}};
$db->insert(teams => {%$values, %$details});
}
Expand All @@ -31,7 +31,7 @@ sub run {
vulns => $service_info->{vulns}{distribution},
public_flag_description => $service_info->{public_flag_description}
};
$service_data->{id} = $service->{id} if $service->{id};
$service_data->{id} = $service->{id} if defined $service->{id};
if (my $active = $service->{active}) {
$service_data->{ts_start} = $active->[0];
$service_data->{ts_end} = $active->[1];
Expand Down

0 comments on commit 4f21aa3

Please sign in to comment.