]> git.proxmox.com Git - pmg-api.git/commitdiff
subscription: handle missing subscription info
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 7 Sep 2022 08:48:24 +0000 (10:48 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 7 Sep 2022 08:48:24 +0000 (10:48 +0200)
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
src/PMG/API2/Subscription.pm

index c30718c709d7d2343bfbedb5cb3fefca493aad05..61f4bda31bca33616b2be711fd3a4a295f693990 100644 (file)
@@ -36,6 +36,7 @@ sub read_etc_subscription {
     my $server_id = PMG::Utils::get_hwaddress();
 
     my $info = Proxmox::RS::Subscription::read_subscription($filename);
+    return $info if !$info;
 
     my $level = parse_key($info->{key});