mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 19:57:29 +01:00
Fix incomplete datetime being stored in releases, order releases by date
This commit is contained in:
parent
d03947462d
commit
bbb46ce19a
@ -108,7 +108,8 @@ class Package(db.Model):
|
|||||||
forums = db.Column(db.String(200), nullable=False)
|
forums = db.Column(db.String(200), nullable=False)
|
||||||
|
|
||||||
# Releases
|
# Releases
|
||||||
releases = db.relationship('PackageRelease', backref='package', lazy='dynamic')
|
releases = db.relationship('PackageRelease', backref='package',
|
||||||
|
lazy='dynamic', order_by=db.desc("package_release_releaseDate"))
|
||||||
|
|
||||||
def getDetailsURL(self):
|
def getDetailsURL(self):
|
||||||
return url_for("package_page",
|
return url_for("package_page",
|
||||||
@ -160,7 +161,7 @@ class PackageRelease(db.Model):
|
|||||||
|
|
||||||
package_id = db.Column(db.Integer, db.ForeignKey('package.id'))
|
package_id = db.Column(db.Integer, db.ForeignKey('package.id'))
|
||||||
title = db.Column(db.String(100), nullable=False)
|
title = db.Column(db.String(100), nullable=False)
|
||||||
releaseDate = db.Column(db.Date, nullable=False)
|
releaseDate = db.Column(db.DateTime, nullable=False)
|
||||||
url = db.Column(db.String(100), nullable=False)
|
url = db.Column(db.String(100), nullable=False)
|
||||||
approved = db.Column(db.Boolean, nullable=False, default=False)
|
approved = db.Column(db.Boolean, nullable=False, default=False)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user