activate functions bugs

This commit is contained in:
deflax 2017-07-15 07:35:39 +03:00
parent f222aeae14
commit 449e88789c

View file

@ -149,14 +149,14 @@ def activate(itemid=0):
daysleft = relativedelta(today, months=+(form.period.data))
deploy.last_charge_date = today
deploy.date_last_charge = today
deploy.period = form.period.data
deploy.daysleft = form.period.data * daysleft.days
deploy.warning = False
deploy.enabled = True
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.commit()