From 5a68fe6d57f8d326aded99009ba0c975222cfc15 Mon Sep 17 00:00:00 2001 From: Marc Anton Dahmen Date: Mon, 25 Apr 2022 12:25:25 +0200 Subject: [PATCH] minor fixes --- revitron/analyze/storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/revitron/analyze/storage.py b/revitron/analyze/storage.py index 91434e6..dd0890d 100644 --- a/revitron/analyze/storage.py +++ b/revitron/analyze/storage.py @@ -157,8 +157,8 @@ def add(self, dataProviderResults, modelSize): rowId = 1 remoteItems = self._get('items/{}'.format(self.collection)) if remoteItems: - latestRow = max(remoteItems, key=lambda x: x['id']) - rowId = latestRow['id'] + 1 + maxId = max(row['id'] for row in remoteItems) + rowId = maxId + 1 if self._getRemoteCollection() is None: self._createMissingCollection() self._createMissingFields(dataProviderResults)