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