diff --git a/lib/NGCP/Cleanup.pm b/lib/NGCP/Cleanup.pm index 4da2975..c5bfeb2 100644 --- a/lib/NGCP/Cleanup.pm +++ b/lib/NGCP/Cleanup.pm @@ -745,9 +745,9 @@ SQL my $meth = $vals{$key}->{meth}; # delete from cid map - $redis->srem("acc:cid::$cid", $key); + $redis->srem("acc:cid::$cid", $key) if defined $cid; # delete from meth map - $redis->srem("acc:meth::$meth", $key); + $redis->srem("acc:meth::$meth", $key) if defined $meth; } } else { $self->error("insert into mysql: ".$DBI::errstr) if $DBI::err;