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:
parent
4d6de0138a
commit
06fe19fcf2
@ -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 🍾
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user