🐛 Fix treating of None sorting value
`None` values were converted to an empty string by sv, leading to comparison issues with (correct) integers. Using the default order value for sv fixes that. Closes #4818
This commit is contained in:
1 parent
0753c1ef6f
commit
2397867d28
1 file changed
+11
-4
@@ -577,7 +577,9 @@ class PluginInfo:
|
||||
self._version
|
||||
if self._version is not None
|
||||
else self._get_instance_attribute(
|
||||
ControlProperties.attr_version, default=self._version, incl_metadata=True
|
||||
ControlProperties.attr_version,
|
||||
default=self._version,
|
||||
incl_metadata=True,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -959,7 +961,9 @@ class PluginManager:
|
||||
if self.plugin_folders:
|
||||
try:
|
||||
added, found = self._find_plugins_from_folders(
|
||||
self.plugin_folders, existing, ignored_uninstalled=ignore_uninstalled
|
||||
self.plugin_folders,
|
||||
existing,
|
||||
ignored_uninstalled=ignore_uninstalled,
|
||||
)
|
||||
result_added.update(added)
|
||||
result_found += found
|
||||
@@ -1791,7 +1795,10 @@ class PluginManager:
|
||||
plugin_hooks = plugin.hooks.keys()
|
||||
|
||||
return any(
|
||||
map(lambda hook: PluginManager.hook_matches_hooks(hook, *hooks), plugin_hooks)
|
||||
map(
|
||||
lambda hook: PluginManager.hook_matches_hooks(hook, *hooks),
|
||||
plugin_hooks,
|
||||
)
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
@@ -2168,7 +2175,7 @@ class PluginManager:
|
||||
|
||||
plugin_info = self.get_plugin_info(impl[0], require_enabled=False)
|
||||
return (
|
||||
sv(sorting_value),
|
||||
sv(sorting_value, default_value=self.default_order),
|
||||
not plugin_info.bundled if plugin_info else True,
|
||||
sv(impl[0]),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user