mirror of
https://github.com/minetest/contentdb.git
synced 2025-03-23 18:42:37 +01:00
Fix misattribution of review due to missing reply ordering
This commit is contained in:
app
@ -1101,10 +1101,11 @@ class Thread(db.Model):
|
|||||||
|
|
||||||
created_at = db.Column(db.DateTime, nullable=False, default=datetime.datetime.utcnow)
|
created_at = db.Column(db.DateTime, nullable=False, default=datetime.datetime.utcnow)
|
||||||
|
|
||||||
replies = db.relationship("ThreadReply", backref="thread", lazy="dynamic")
|
replies = db.relationship("ThreadReply", backref="thread", lazy="dynamic", \
|
||||||
|
order_by=db.asc("thread_reply_id"))
|
||||||
|
|
||||||
watchers = db.relationship("User", secondary=watchers, lazy="subquery", \
|
watchers = db.relationship("User", secondary=watchers, lazy="subquery", \
|
||||||
backref=db.backref("watching", lazy=True))
|
backref=db.backref("watching", lazy=True))
|
||||||
|
|
||||||
def getViewURL(self):
|
def getViewURL(self):
|
||||||
return url_for("threads.view", id=self.id)
|
return url_for("threads.view", id=self.id)
|
||||||
|
@ -19,14 +19,14 @@
|
|||||||
<div class="col pr-0">
|
<div class="col pr-0">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<a class="author {{ reply.author.rank.name }}"
|
<a class="author {{ review.author.rank.name }}"
|
||||||
href="{{ url_for('users.profile', username=reply.author.username) }}">
|
href="{{ url_for('users.profile', username=review.author.username) }}">
|
||||||
{{ reply.author.display_name }}
|
{{ review.author.display_name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a name="reply-{{ reply.id }}" class="text-muted float-right"
|
<a name="reply-{{ reply.id }}" class="text-muted float-right"
|
||||||
href="{{ url_for('threads.view', id=review.thread.id) }}#reply-{{ reply.id }}">
|
href="{{ url_for('threads.view', id=review.thread.id) }}#reply-{{ reply.id }}">
|
||||||
{{ reply.created_at | datetime }}
|
{{ review.created_at | datetime }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user