mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 11:40:58 +00:00
Group API (#4327)
* Add basic endpoint for group information * Add hardcoded api-url lookup function for django models * Adds JS function for rendering a 'group' * Fix typo * Add unit tests for new endpoints * Increment API version * JS linting
This commit is contained in:
@ -704,6 +704,17 @@ class BaseInvenTreeSetting(models.Model):
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
# Some other model types are hard-coded
|
||||
hardcoded_models = {
|
||||
'auth.user': 'api-user-list',
|
||||
'auth.group': 'api-group-list',
|
||||
}
|
||||
|
||||
model_table = f'{model_class._meta.app_label}.{model_class._meta.model_name}'
|
||||
|
||||
if url := hardcoded_models[model_table]:
|
||||
return reverse(url)
|
||||
|
||||
return None
|
||||
|
||||
def is_bool(self):
|
||||
|
Reference in New Issue
Block a user