mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-14 03:23:46 +01:00
Fix broken state comparison due to enum ordering
This commit is contained in:
parent
9a1c1c56e6
commit
a1e0e37223
@ -20,6 +20,7 @@ import flask_menu as menu
|
|||||||
from app.models import *
|
from app.models import *
|
||||||
from app.querybuilder import QueryBuilder
|
from app.querybuilder import QueryBuilder
|
||||||
from app.utils import get_int_or_abort
|
from app.utils import get_int_or_abort
|
||||||
|
from sqlalchemy import or_
|
||||||
|
|
||||||
bp = Blueprint("todo", __name__)
|
bp = Blueprint("todo", __name__)
|
||||||
|
|
||||||
@ -35,7 +36,7 @@ def view():
|
|||||||
if canApproveNew:
|
if canApproveNew:
|
||||||
packages = Package.query.filter_by(state=PackageState.READY_FOR_REVIEW) \
|
packages = Package.query.filter_by(state=PackageState.READY_FOR_REVIEW) \
|
||||||
.order_by(db.desc(Package.created_at)).all()
|
.order_by(db.desc(Package.created_at)).all()
|
||||||
wip_packages = Package.query.filter(Package.state<PackageState.READY_FOR_REVIEW) \
|
wip_packages = Package.query.filter(or_(Package.state==PackageState.WIP, Package.state==PackageState.CHANGES_NEEDED)) \
|
||||||
.order_by(db.desc(Package.created_at)).all()
|
.order_by(db.desc(Package.created_at)).all()
|
||||||
|
|
||||||
releases = None
|
releases = None
|
||||||
|
Loading…
Reference in New Issue
Block a user