forked from FarmMaps/FarmMapsApiClient
final fix
This commit is contained in:
parent
cb892e9192
commit
81218ec0d0
@ -59,13 +59,12 @@ namespace FarmmapsApi.Services
|
|||||||
{
|
{
|
||||||
List<Item> items = await _farmmapsApiService.GetItemChildrenAsync(zipItem.Code,
|
List<Item> items = await _farmmapsApiService.GetItemChildrenAsync(zipItem.Code,
|
||||||
SHAPE_PROCESSED_ITEMTYPE);
|
SHAPE_PROCESSED_ITEMTYPE);
|
||||||
|
|
||||||
|
items = items.Where(i => i.Created >= startUpload).OrderByDescending(i => i.Created).ToList();
|
||||||
|
|
||||||
if (items.Count(i => i.Created >= startUpload) > 0)
|
if (items.Any())
|
||||||
{
|
{
|
||||||
shapeItem = items.Where(i => i.Name.Contains(itemName))
|
shapeItem = items.First(i => i.Name.Contains(itemName));
|
||||||
.OrderByDescending(i => i.Created)
|
|
||||||
.First();
|
|
||||||
|
|
||||||
if(shapeItem != null)
|
if(shapeItem != null)
|
||||||
{
|
{
|
||||||
source.Cancel();
|
source.Cancel();
|
||||||
|
Loading…
Reference in New Issue
Block a user