Skip to content

Commit 0cfa5a5

Browse files
fix: remove unused meta.installed (#586)
* fix: remove unused meta.installed * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 81bb440 commit 0cfa5a5

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

view_breadcrumbs/utils.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from django.core.exceptions import AppRegistryNotReady
21
from django.utils.encoding import force_str
3-
from django.utils.translation import gettext_lazy as _
42
from django.utils.translation import override
53

64

@@ -38,21 +36,7 @@ def get_model_name(model):
3836

3937

4038
def get_model_info(model):
41-
if model._meta.installed:
42-
return get_app_label(model), get_model_name(model)
43-
44-
raise AppRegistryNotReady(
45-
_("%(model)s is not installed or missing from the app registry.")
46-
% {
47-
"model": (
48-
getattr(
49-
model._meta,
50-
"app_label",
51-
model.__class__.__name__,
52-
)
53-
)
54-
}
55-
)
39+
return get_app_label(model), get_model_name(model)
5640

5741

5842
def action_view_name(*, model, action, app_name=None, full=True):

0 commit comments

Comments
 (0)