From 0f449d3c121cf7c66d898f4901234429696ed4b5 Mon Sep 17 00:00:00 2001 From: Russell Cloran Date: Tue, 30 May 2023 14:35:52 -0700 Subject: [PATCH] Fix syncing observations with no identifications If no identifications were present on the observation, there will not be any keywords to be set. If there are no keywords, don't try to examine the kw object to set keywords on the photo... --- lr-inaturalist-publish.lrdevplugin/SyncObservations.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lr-inaturalist-publish.lrdevplugin/SyncObservations.lua b/lr-inaturalist-publish.lrdevplugin/SyncObservations.lua index b94c8c6..edb401e 100644 --- a/lr-inaturalist-publish.lrdevplugin/SyncObservations.lua +++ b/lr-inaturalist-publish.lrdevplugin/SyncObservations.lua @@ -241,6 +241,10 @@ local function kwIsEquivalent(kw, hierarchy, rootId) end local function syncKeywords(photo, kw, settings, keywordCache) + if not kw then + return + end + local unwanted = {} local needsAddition = true if settings.syncKeywords and kw then