mirror of
https://github.com/inventree/InvenTree.git
synced 2026-07-17 12:13:49 +00:00
[bug] Plugin load fix (#12329)
* Update plugin name * Backup accessor for plugin name * Add null check for plg_db
This commit is contained in:
@@ -677,6 +677,11 @@ class PluginsRegistry:
|
|||||||
|
|
||||||
if plg_key in configs:
|
if plg_key in configs:
|
||||||
plg_db = configs[plg_key]
|
plg_db = configs[plg_key]
|
||||||
|
|
||||||
|
# Handle edge case where PluginConfig has been created without a valid name
|
||||||
|
if plg_name and plg_db and plg_db.name != plg_name:
|
||||||
|
plg_db.name = plg_name
|
||||||
|
plg_db.save()
|
||||||
else:
|
else:
|
||||||
plg_db = self.get_plugin_config(plg_key, plg_name)
|
plg_db = self.get_plugin_config(plg_key, plg_name)
|
||||||
|
|
||||||
|
|||||||
@@ -85,10 +85,12 @@ export default function PluginListTable() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const name: string = record.name || record.meta?.human_name;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Group justify='left'>
|
<Group justify='left'>
|
||||||
<PluginIcon plugin={record} />
|
<PluginIcon plugin={record} />
|
||||||
<Text>{record.name}</Text>
|
<Text size='sm'>{name}</Text>
|
||||||
</Group>
|
</Group>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user