Commit e1a97081 authored by Aleksey Shirokih's avatar Aleksey Shirokih
Browse files

migrate session_ttl to be compatible with noc feature/config

parent 152643fd
# Third-party modules
import yaml
# Tower modules
from tower.models.environment import Environment
def migrate(migrator):
for env in
config = yaml.load(env.service_config)
if "session_ttl" in config[None]["login"]:
if "d" not in str(config[None]["login"]["session_ttl"]):
config[None]["login"]["session_ttl"] = str(config[None]["login"]["session_ttl"]) + "d"
env.service_config = yaml.dump(config)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment