Unverified Commit 88227899 authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

Operators: gracefully handle missing adminIDs

parent 37db8fb0
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -41,11 +41,17 @@ $buf .= <<'EOF';

sub get_operator {
	my ($id) = @_;
	if (not defined $id) {
		return;
	}
	return $admin_id_to_operator{$id};
}

sub get_operator_abbr {
	my ($id) = @_;
	if (not defined $id) {
		return;
	}
	if (my $op = $admin_id_to_operator{$id}) {
		return $op->[0];
	}
@@ -54,6 +60,9 @@ sub get_operator_abbr {

sub get_operator_name {
	my ($id) = @_;
	if (not defined $id) {
		return;
	}
	if (my $op = $admin_id_to_operator{$id}) {
		return $op->[1];
	}