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'

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)