We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d44499 commit 892a71fCopy full SHA for 892a71f
ansible_base/rbac/managed.py
@@ -39,7 +39,11 @@ def get_content_type(self, apps):
39
model = self.get_model(apps)
40
if model is None:
41
return None
42
- content_type_cls = apps.get_model('dab_rbac', 'DABContentType')
+ # NOTE: this is subject to major migration-related hazards
43
+ try:
44
+ content_type_cls = apps.get_model('dab_rbac', 'DABContentType')
45
+ except LookupError:
46
+ content_type_cls = apps.get_model('contenttypes', 'ContentType')
47
return content_type_cls.objects.get_for_model(model)
48
49
def get_or_create(self, apps):
0 commit comments