]> git.donarmstrong.com Git - debbugs.git/commitdiff
keep done/owner/submitter NULL if there is no submitter/done/owner
authorDon Armstrong <don@donarmstrong.com>
Sun, 12 Mar 2017 14:43:30 +0000 (07:43 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 12 Mar 2017 14:43:30 +0000 (07:43 -0700)
Debbugs/DB/Load.pm

index bad48b5e6a2971791275a8925e61d6bf8e11e032..dfc1db9869b0a400d8d3427ad3026d7ee900d319 100644 (file)
@@ -162,6 +162,9 @@ sub load_bug {
          submitter => 'originator',
         );
     for my $addr_type (keys %addr_map) {
+       $bug->{$addr_type} = undef;
+       next unless defined $data->{$addr_map{$addr_type}} and
+           length($data->{$addr_map{$addr_type}});
         $bug->{$addr_type} =
            $s->resultset('Correspondent')->
            get_correspondent_id($data->{$addr_map{$addr_type}})