_verifyRequestTypeId =>_lookupRequestTypeById

I found need to have _verifyRequestTypeId() actually return the
request_type in a reimplementation of getRequest() that I'm working on,
so I've made this change.
This commit is contained in:
Bradley M. Kuhn 2015-12-30 03:57:19 -08:00
parent 10030b3488
commit e4dcfd11d5

View file

@ -968,7 +968,7 @@ sub _getOrCreateRequestType($$) {
} else { } else {
my $id = $params->{requestTypeId}; my $id = $params->{requestTypeId};
die "_getOrCreateRequestType(): invalid requestTypeId, \"$id\"" die "_getOrCreateRequestType(): invalid requestTypeId, \"$id\""
unless $self->_verifyRequestTypeId($id); unless defined $self->_lookupRequestTypeById($id);
} }
delete $params->{requestType}; delete $params->{requestType};
} }