pombreda / formalchemy

Automatically exported from code.google.com/p/formalchemy
MIT License
0 stars 0 forks source link

Pylons admin got ValueError with objects of SA inheritance classes #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
*Steps to reproduce the error
Create a model class and a subclass.
Create objects of the classes
Access the parent model in the Pylons admin.
It gets ValueError;

  You can only bind to another object of the same
  type you originally bound to

It seems ModelRenderer.rebind wants exactly the same type.
I guess it's safe to allow subclasses of the originally
bound one.

Attached patch modifies the type checking.

Original issue reported on code.google.com by tokyo...@gmail.com on 6 Jan 2010 at 12:56

Attachments:

GoogleCodeExporter commented 9 years ago
Applied. Thanks.

Original comment by gael.pas...@gmail.com on 10 Jan 2010 at 1:15