Remove support for invalid relation type column

Fixes #4443.
This commit is contained in:
Luke Towers 2019-07-09 08:25:08 -06:00 committed by GitHub
parent f9f337e664
commit 029a299816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 11 deletions

View File

@ -1150,8 +1150,13 @@ class Lists extends WidgetBase
return call_user_func_array($callback, [$value, $column, $record]);
}
}
$customMessage = '';
if ($type === 'relation') {
$message = 'Type: relation is not supported, instead use the relation property to specify a relationship to pull the value from and set the type to the type of the value expected.';
}
throw new ApplicationException(sprintf('List column type "%s" could not be found.', $type));
throw new ApplicationException(sprintf('List column type "%s" could not be found. %s', $type, $customMessage));
}
/**
@ -1178,16 +1183,6 @@ class Lists extends WidgetBase
return $this->evalTextTypeValue($record, $column, $value);
}
/**
* Common mistake, relation is not a valid list column.
* @deprecated Remove if year >= 2018
*/
protected function evalRelationTypeValue($record, $column, $value)
{
traceLog(sprintf('Warning: List column type "relation" for class "%s" is not valid.', get_class($record)));
return $this->evalTextTypeValue($record, $column, $value);
}
/**
* Process as partial reference
*/