mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-04 10:02:40 +01: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:
parent
2f42e7dd83
commit
bfb167c374
@ -84,6 +84,12 @@ public static string GetColumnName(Type declaringType, string propertyName, bool
|
||||
string columnName = 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)
|
||||
{
|
||||
columnName = columnMap.ColumnInfo.TryGetAltName();
|
||||
|
Loading…
Reference in New Issue
Block a user