Open jace opened 7 years ago
Baseframe has two uses of edit_id
.
In forms/form.py
, where the form constructor is notionally unaware of SQLAlchemy but checks if the object has an attribute named id
. Introducing SQLAlchemy awareness seems like a bad idea here.
In forms/sqlalchemy.py
, in the AvailableAttr
(previously AvailableName
) validator, where edit_id
could be replaced with the inspect approach, but where we also need to know the columns to test against in a query.
Baseframe forms provide an
edit_id
that is set toobj.id
. As discussed in hasgeek/coaster#111, this is incorrect usage.edit_id
should be deprecated in favour of anedit_identity
value using the correct method. (We use a different name here since the value will change from a scalar to a tuple.) All references within Baseframe toedit_id
must be replaced withedit_identity
(for example in something likeAvailableName
).