ArgumentError: relationship expects a class or mapper argument ArgumentError: relationship expects a class or mapper argument python python

ArgumentError: relationship expects a class or mapper argument


not happy with myself since it's such a dumb mistake but here is my culprit:

report_type = relationship('tReportType',                           uselist=False,                           backref=backref('report'))

should be:

report_type = relationship('TReportType',                           uselist=False,                           backref=backref('report'))

capital T instead of t, I should be referencing the class, not my actual table name: 'tReportType' -> 'TReportType'