rel_to undefined in init scope of RelatedFieldWidgetWrapper
|Reported by:||Rob Hudson||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
While perusing code in the admin I noticed that this variable is undefined in the RelatedFieldWidgetWrapper.init. I was on the hunt for something else but thought I'd log this as a bug since it'll likely always be false...
if can_add_related is None: can_add_related = rel_to in self.admin_site._registry
I believe, on cursory glance, that this should be