fix:Fixed the problem of plugin installation failure caused by incons… (#22156)
This commit is contained in:
@@ -427,6 +427,9 @@ class PluginService:
|
|||||||
|
|
||||||
manager = PluginInstaller()
|
manager = PluginInstaller()
|
||||||
|
|
||||||
|
# collect actual plugin_unique_identifiers
|
||||||
|
actual_plugin_unique_identifiers = []
|
||||||
|
metas = []
|
||||||
features = FeatureService.get_system_features()
|
features = FeatureService.get_system_features()
|
||||||
|
|
||||||
# check if already downloaded
|
# check if already downloaded
|
||||||
@@ -437,6 +440,8 @@ class PluginService:
|
|||||||
# check if the plugin is available to install
|
# check if the plugin is available to install
|
||||||
PluginService._check_plugin_installation_scope(plugin_decode_response.verification)
|
PluginService._check_plugin_installation_scope(plugin_decode_response.verification)
|
||||||
# already downloaded, skip
|
# already downloaded, skip
|
||||||
|
actual_plugin_unique_identifiers.append(plugin_unique_identifier)
|
||||||
|
metas.append({"plugin_unique_identifier": plugin_unique_identifier})
|
||||||
except Exception:
|
except Exception:
|
||||||
# plugin not installed, download and upload pkg
|
# plugin not installed, download and upload pkg
|
||||||
pkg = download_plugin_pkg(plugin_unique_identifier)
|
pkg = download_plugin_pkg(plugin_unique_identifier)
|
||||||
@@ -447,17 +452,15 @@ class PluginService:
|
|||||||
)
|
)
|
||||||
# check if the plugin is available to install
|
# check if the plugin is available to install
|
||||||
PluginService._check_plugin_installation_scope(response.verification)
|
PluginService._check_plugin_installation_scope(response.verification)
|
||||||
|
# use response plugin_unique_identifier
|
||||||
|
actual_plugin_unique_identifiers.append(response.unique_identifier)
|
||||||
|
metas.append({"plugin_unique_identifier": response.unique_identifier})
|
||||||
|
|
||||||
return manager.install_from_identifiers(
|
return manager.install_from_identifiers(
|
||||||
tenant_id,
|
tenant_id,
|
||||||
plugin_unique_identifiers,
|
actual_plugin_unique_identifiers,
|
||||||
PluginInstallationSource.Marketplace,
|
PluginInstallationSource.Marketplace,
|
||||||
[
|
metas,
|
||||||
{
|
|
||||||
"plugin_unique_identifier": plugin_unique_identifier,
|
|
||||||
}
|
|
||||||
for plugin_unique_identifier in plugin_unique_identifiers
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Reference in New Issue
Block a user