Skip to content

Commit

Permalink
Recover django 4.2 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
fsbraun committed Oct 27, 2024
1 parent 393d2cb commit efbdf51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djangocms_link/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def ready(self):
model = apps.get_model(model)
if not hasattr(model, "get_absolute_url"): # pragma: no cover
raise ImproperlyConfigured(f"{model.__name__} needs to implement get_absolute_url method")
admin = admin.site.get_model_admin(model)
admin = admin.site._registry[model]
if admin not in admins:
admins.append(admin)
elif not isinstance(model, ModelAdmin): # pragma: no cover
Expand Down

0 comments on commit efbdf51

Please sign in to comment.