db TFPolicyData query get 35 db TFPolicyData query get TFPolicyData 30

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
>>> db.TFPolicyData.query.get(35)
>>> db.TFPolicyData.query.get(1)
<<< <TFPolicyData: 3003:120 (active)>
>>> db.TFPolicyData.query.filter_by(tf_id=35)
<<< <sqlalchemy.orm.query.Query object at 0x872facc>
>>> _.first()
>>> db.TFPolicyData.query.filter_by(tf_id=1)
<<< <sqlalchemy.orm.query.Query object at 0x8754cec>
>>> _.first()
<<< <TFPolicyData: 3003:120 (active)>
>>> db.TFPolicyData.query.filter_by(tf_id=35)
<<< <sqlalchemy.orm.query.Query object at 0x8754eac>
>>> list(_)
<<< []