Open hroncok opened 8 years ago
Oh, it seems the problem is here:
class CourseManager(AlchemyManager):
fields = ('id_course', 'sport',) # <-- sport should not be here!
model = Course
My bad :(
Still, perhaps issue a different kind of exception?
You can include 'sport.id'
in which case it'll return something like {'sport': {'id': 1}}
You're right that it should be a more explicit exception though.
Given the following example (search for
HERE IS THE PROBLEM
):If I GET /courses/1/, I get a nasty exception:
The problem is here: https://github.com/vertical-knowledge/ripozo-sqlalchemy/blob/master/ripozo_sqlalchemy/alchemymanager.py#L106
The joined part is empty string.
But even when I remove that and return just object, as it was previously before 4445a19bb644daa91b1004a8c6555c901e82b301 I still get weird errors.
What am I doing wrong? I've spend couple of hours trying and I'm clueless.
Thanks for any help.