发布(0.4.6): 修复预售兑换记录判定与详情展示并新增工作台强制发放
This commit is contained in:
@@ -49,7 +49,14 @@ def _resolve_gift(
|
||||
if cid:
|
||||
row = query.filter(DouyuGoodsSnapshot.commodity_id == cid).first()
|
||||
if row is None and name:
|
||||
row = query.filter(DouyuGoodsSnapshot.name == name).first()
|
||||
row = (
|
||||
query.filter(DouyuGoodsSnapshot.name == name)
|
||||
.order_by(
|
||||
DouyuGoodsSnapshot.updated_at.desc(),
|
||||
DouyuGoodsSnapshot.id.desc(),
|
||||
)
|
||||
.first()
|
||||
)
|
||||
if row is not None:
|
||||
if not name:
|
||||
name = _text(row.name, max_length=128)
|
||||
|
||||
Reference in New Issue
Block a user