Add new Plan

This commit is contained in:
Kekskurse 2019-07-11 14:07:42 +02:00
parent f67b9faf5c
commit a1977f619a
1 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,7 @@ plans.append({"name": "Unlimit", "number": "8", "canBeBooked": True})
plans.append({"name": "1 GB", "number": "9", "canBeBooked": True})
plans.append({"name": "Break", "number": "42", "canBeBooked": True})
plans.append({"name": "Unlimit - First Day", "number": "40", "canBeBooked": False})
plans.append({"name": "Unlimit - Immidiately", "number": "43", "canBeBooked": False})
#Helper
@ -183,7 +184,7 @@ def function_updateAccountsAtFunk():
planedPlan = function_getPlanForDay(account["number"], tomorrow.year, tomorrow.month, tomorrow.day)
plan = getCurrentPlan(api, tomorrow)
currentPlan = getCurrentPlan(api)
if currentPlan == 42:
if currentPlan == 42: # Wenn aktuell eine pause ist darf das update erst am selben tag erfolgen wie der neue Plan gültug ist
planedPlan = function_getPlanForDay(account["number"], today.year, today.month, today.day)
if planedPlan == "8": #Change to unlimit
api.orderUnlimitedPlan()
@ -432,6 +433,6 @@ else:
if __name__ == '__main__':
app.run(debug=False,host='0.0.0.0')
app.run(debug=True,host='0.0.0.0')