1
0
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:
Jeremy Stretch
2020-01-15 16:21:41 -05:00
parent 215b4d0b3f
commit c28684a8b3
4 changed files with 1 additions and 14 deletions

View File

@@ -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.