mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 11:10:54 +00:00
Model introspection
- Find the class registered to the model (or log an error) - Pass the api_url through to the frontend
This commit is contained in:
@ -137,7 +137,7 @@ class PluginSetting(common.models.BaseInvenTreeSetting):
|
||||
|
||||
if 'settings' not in kwargs:
|
||||
|
||||
plugin = kwargs.pop('plugin')
|
||||
plugin = kwargs.pop('plugin', None)
|
||||
|
||||
if plugin:
|
||||
|
||||
|
@ -68,7 +68,12 @@ class SampleIntegrationPlugin(AppMixin, SettingsMixin, UrlsMixin, NavigationMixi
|
||||
'SELECT_COMPANY': {
|
||||
'name': 'Company',
|
||||
'description': 'Select a company object from the database',
|
||||
'model': 'company.Company',
|
||||
'model': 'company.company',
|
||||
},
|
||||
'SELECT_PART': {
|
||||
'name': 'Part',
|
||||
'description': 'Select a part object from the database',
|
||||
'model': 'part.part',
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user