activate functions bugs
This commit is contained in:
parent
f222aeae14
commit
449e88789c
1 changed files with 2 additions and 2 deletions
|
@ -149,14 +149,14 @@ def activate(itemid=0):
|
||||||
|
|
||||||
daysleft = relativedelta(today, months=+(form.period.data))
|
daysleft = relativedelta(today, months=+(form.period.data))
|
||||||
|
|
||||||
deploy.last_charge_date = today
|
deploy.date_last_charge = today
|
||||||
deploy.period = form.period.data
|
deploy.period = form.period.data
|
||||||
deploy.daysleft = form.period.data * daysleft.days
|
deploy.daysleft = form.period.data * daysleft.days
|
||||||
deploy.warning = False
|
deploy.warning = False
|
||||||
deploy.enabled = True
|
deploy.enabled = True
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
transaction = Transaction(user_id=int(current_user.pid), description='Deployment {} activated for {} month(s)'.format(deploy.machine_alias, form.period.data), value=-total)
|
transaction = Transaction(user_id=int(current_user.pid), description='Deployment {} activated for {} month(s)'.format(str(deploy.machine_alias), form.period.data), value=-total)
|
||||||
db.session.add(transaction)
|
db.session.add(transaction)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue