From 6a749d0713f839bd5a2ef9efcb85305a2af11db5 Mon Sep 17 00:00:00 2001 From: scrimpys Date: Sun, 4 Feb 2024 12:40:38 +1100 Subject: [PATCH] Update massadmin.py change to isinstance() call on line 126 to allow proper operation when complaining with cython. --- massadmin/massadmin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/massadmin/massadmin.py b/massadmin/massadmin.py index 4eb51db..dfa3a44 100644 --- a/massadmin/massadmin.py +++ b/massadmin/massadmin.py @@ -123,7 +123,7 @@ def __init__(self, model, admin_site): raise Exception('Model not registered with the admin site.') for (varname, var) in self.get_overrided_properties().items(): - if not varname.startswith('_') and not isinstance(var, types.FunctionType): + if not varname.startswith('_') and not callable(var): self.__dict__[varname] = var super(MassAdmin, self).__init__(model, admin_site)