mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 18:36:38 -06:00
fixed bug for records with deleted views.
This commit is contained in:
parent
ecef1c8640
commit
ac1c2ca7fe
@ -176,8 +176,12 @@ namespace CarCareTracker.Helper
|
|||||||
var fieldNames = templateExtraFields.Select(x => x.Name);
|
var fieldNames = templateExtraFields.Select(x => x.Name);
|
||||||
//remove fields that are no longer present in template.
|
//remove fields that are no longer present in template.
|
||||||
recordExtraFields.RemoveAll(x => !fieldNames.Contains(x.Name));
|
recordExtraFields.RemoveAll(x => !fieldNames.Contains(x.Name));
|
||||||
|
if (!recordExtraFields.Any())
|
||||||
|
{
|
||||||
|
return templateExtraFields;
|
||||||
|
}
|
||||||
//append the fields.
|
//append the fields.
|
||||||
foreach(ExtraField extraField in recordExtraFields)
|
foreach (ExtraField extraField in recordExtraFields)
|
||||||
{
|
{
|
||||||
extraField.IsRequired = templateExtraFields.Where(x => x.Name == extraField.Name).First().IsRequired;
|
extraField.IsRequired = templateExtraFields.Where(x => x.Name == extraField.Name).First().IsRequired;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user