mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
added check for marr data to throw a more meaning full exception when trying to operate on an unmapped column.
This commit is contained in:
@@ -84,6 +84,12 @@ namespace Marr.Data
|
|||||||
string columnName = propertyName;
|
string columnName = propertyName;
|
||||||
|
|
||||||
var columnMap = MapRepository.Instance.GetColumns(declaringType).GetByFieldName(propertyName);
|
var columnMap = MapRepository.Instance.GetColumns(declaringType).GetByFieldName(propertyName);
|
||||||
|
|
||||||
|
if (columnMap == null)
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException(string.Format("Column map missing for field {0}.{1}", declaringType.FullName, propertyName));
|
||||||
|
}
|
||||||
|
|
||||||
if (useAltName)
|
if (useAltName)
|
||||||
{
|
{
|
||||||
columnName = columnMap.ColumnInfo.TryGetAltName();
|
columnName = columnMap.ColumnInfo.TryGetAltName();
|
||||||
|
Reference in New Issue
Block a user