Commit 40478732 authored by Alex Vandiver's avatar Alex Vandiver
Browse files

Provide a better error message for loading OCFVs on an invalid CF

parent b7a8c03f
......@@ -140,6 +140,8 @@ sub LoadByCols {
if ( $args{CustomField} ) {
$cf = RT::CustomField->new( $self->CurrentUser );
$cf->Load( $args{CustomField} );
return (0, $self->loc("Cannot load custom field [_1]",$args{CustomField})) unless $cf->id;
if ( $cf->Type && $cf->Type eq 'IPAddressRange' ) {
my ( $sIP, $eIP ) = $cf->ParseIPRange( $args{'Content'} );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment