From bcdeaa04b812ff4b9b50e287c3f10b9837e1cf24 Mon Sep 17 00:00:00 2001 From: Jeremy Engel <4955347+jeremy-engel@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:41:14 -0700 Subject: [PATCH] Switch call from removed is_hidden method to hidden property `ForeignObjectRel.is_hidden()` was removed in https://github.com/django/django/pull/17862 in favor of the `hidden` property of the same class. This change will be released in django 5.1. In previous versions of django, the `hidden` property called the `is_hidden()` method, so there should not be changes in behavior for older versions. --- reversion/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reversion/admin.py b/reversion/admin.py index 77d2cf2e..5ab748a1 100644 --- a/reversion/admin.py +++ b/reversion/admin.py @@ -116,7 +116,7 @@ def _reversion_introspect_inline_admin(self, inline): ): fk_name = field.name break - if fk_name and not inline_model._meta.get_field(fk_name).remote_field.is_hidden(): + if fk_name and not inline_model._meta.get_field(fk_name).remote_field.hidden: field = inline_model._meta.get_field(fk_name) accessor = field.remote_field.get_accessor_name() follow_field = accessor