mirror of
https://github.com/Lost-MSth/Arcaea-server.git
synced 2026-02-10 09:47:26 +08:00
Update to v2.8.2 without release
- Try to add support for Anniversary 5 ticket - Update the song database > Well, there may be bugs with Anniversary 5 ticket. Remember it can only be used when the pack is on sale.
This commit is contained in:
@@ -764,6 +764,7 @@ def change_purchase():
|
||||
orig_price = request.form['orig_price']
|
||||
discount_from = request.form['discount_from']
|
||||
discount_to = request.form['discount_to']
|
||||
discount_reason = request.form['discount_reason']
|
||||
|
||||
if price:
|
||||
price = int(price)
|
||||
@@ -783,6 +784,10 @@ def change_purchase():
|
||||
discount_to, "%Y-%m-%dT%H:%M"))) * 1000
|
||||
else:
|
||||
discount_to = -1
|
||||
|
||||
if not discount_reason:
|
||||
discount_reason = ''
|
||||
|
||||
except:
|
||||
error = '数据错误 Wrong data.'
|
||||
flash(error)
|
||||
@@ -792,8 +797,8 @@ def change_purchase():
|
||||
c.execute(
|
||||
'''select exists(select * from purchase where purchase_name=:a)''', {'a': purchase_name})
|
||||
if c.fetchone() == (0,):
|
||||
c.execute('''insert into purchase values(?,?,?,?,?)''',
|
||||
(purchase_name, price, orig_price, discount_from, discount_to))
|
||||
c.execute('''insert into purchase values(?,?,?,?,?,?)''',
|
||||
(purchase_name, price, orig_price, discount_from, discount_to, discount_reason))
|
||||
|
||||
flash('购买项目添加成功 Successfully add the purchase.')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user