6
0
mirror of https://github.com/ChristianLight/tutor.git synced 2024-12-13 06:37:46 +00:00

Fix KeyError when running `local quickstart` for the first time

This was due to incorrect parsing of the version number.
This commit is contained in:
Régis Behmo 2020-06-15 17:57:14 +02:00
parent 4d6de0138a
commit 06fe19fcf2
2 changed files with 8 additions and 2 deletions

View File

@ -2,6 +2,10 @@
Note: Breaking changes between versions are indicated by "💥".
## Unreleased
- [Bugfix] Fix KeyError when running ``local quickstart`` for the first time
## v10.0.0 (2020-06-15)
- 💥[Improvement] Upgrade to Juniper 🍾

View File

@ -302,14 +302,16 @@ def needs_major_upgrade(root):
"""
current = int(current_version(root).split(".")[0])
required = int(__version__.split(".")[0])
return current < required
return 0 < current < required
def current_release(root):
"""
Return the name of the current Open edX release.
"""
return {"3": "ironwood", "10": "juniper"}[current_version(root).split(".")[0]]
return {"0": "ironwood", "3": "ironwood", "10": "juniper"}[
current_version(root).split(".")[0]
]
def current_version(root):