diff --git a/contrib/admin/widgets.py b/contrib/admin/widgets.py
index 0f567bd..f06c5e4 100644
a
|
b
|
class RelatedFieldWidgetWrapper(forms.Widget):
|
203 | 203 | # Backwards compatible check for whether a user can add related |
204 | 204 | # objects. |
205 | 205 | if can_add_related is None: |
206 | | can_add_related = rel_to in self.admin_site._registry |
| 206 | can_add_related = rel.to in admin_site._registry |
207 | 207 | self.can_add_related = can_add_related |
208 | 208 | # so we can check if the related object is registered with this AdminSite |
209 | 209 | self.admin_site = admin_site |