Closed bthorben closed 7 years ago
I am running into the same issue. Is there a work around other than adding the 'id' attribute?
Putting the below in the model worked as a work around.
@hybrid_property
def id(self):
"""
Eve backward compatibility
"""
return self.etype
Looks like a good workaround!
This should work by now in the current master branch.
Changing a resources id_field and item_loop_field to a custom value like "login" or "name" fails with
File "eve_sqlalchemy/__init__.py", in insert id_field = getattr(model_instance, self.driver.app.config['ID_FIELD']) AttributeError: 'User' object has no attribute 'id'