mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Remove obsolete utility function model_names_to_filter_dict()
This commit is contained in:
@@ -62,17 +62,6 @@ def dynamic_import(name):
|
||||
return mod
|
||||
|
||||
|
||||
def model_names_to_filter_dict(names):
|
||||
"""
|
||||
Accept a list of content types in the format ['<app>.<model>', '<app>.<model>', ...] and return a dictionary
|
||||
suitable for QuerySet filtering.
|
||||
"""
|
||||
# TODO: This should match on the app_label as well as the model name to avoid potential duplicate names
|
||||
return {
|
||||
'model__in': [model.split('.')[1] for model in names],
|
||||
}
|
||||
|
||||
|
||||
def get_subquery(model, field):
|
||||
"""
|
||||
Return a Subquery suitable for annotating a child object count.
|
||||
|
||||
Reference in New Issue
Block a user