mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix marketplace add-on uninstall (#3042)
Instead of using the full id (`marketplace:123456`) the id without service prefix was used to lookup installed add-ons. This is not an issue if the network is available because then the information is request from the forum. If no network connection is present it obviously fails. This also reduces the log level in the case of connection issues. ERROR is to much and the stack trace is not necessary. Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
0b7fc242d4
commit
16cf5a8ae1
@ -189,7 +189,7 @@ public class CommunityMarketplaceAddonService extends AbstractRemoteAddonService
|
||||
.filter(t -> showUnpublished || Arrays.asList(t.tags).contains(PUBLISHED_TAG))
|
||||
.map(t -> convertTopicItemToAddon(t, users)).forEach(addons::add);
|
||||
} catch (Exception e) {
|
||||
logger.error("Unable to retrieve marketplace add-ons", e);
|
||||
logger.warn("Unable to retrieve marketplace add-ons: {}", e.getMessage());
|
||||
}
|
||||
return addons;
|
||||
}
|
||||
@ -199,7 +199,7 @@ public class CommunityMarketplaceAddonService extends AbstractRemoteAddonService
|
||||
String fullId = ADDON_ID_PREFIX + id;
|
||||
// check if it is an installed add-on (cachedAddons also contains possibly incomplete results from the remote
|
||||
// side, we need to retrieve them from Discourse)
|
||||
if (installedAddons.contains(id)) {
|
||||
if (installedAddons.contains(fullId)) {
|
||||
return cachedAddons.stream().filter(e -> fullId.equals(e.getId())).findAny().orElse(null);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user