Browse Source
fix: first message query error (#21444)
Co-authored-by: 刘江波 <jiangbo721@163.com>
tags/1.5.0
jiangbo721
4 months ago
No account linked to committer's email address
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def first_message(self): |
|
|
def first_message(self): |
|
|
return db.session.query(Message).filter(Message.conversation_id == self.id).first() |
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
db.session.query(Message) |
|
|
|
|
|
.filter(Message.conversation_id == self.id) |
|
|
|
|
|
.order_by(Message.created_at.asc()) |
|
|
|
|
|
.first() |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
@property |
|
|
@property |
|
|
def app(self): |
|
|
def app(self): |