fix(version): getting version update (#6717)

* fix(version): getting version update

* fix(version): getting version update
This commit is contained in:
Nabin Hait 2019-01-07 08:57:04 +05:30 committed by Rushabh Mehta
parent cd50fecea0
commit 5590193c8d

View file

@ -135,7 +135,7 @@ def get_app_last_commit_ref(app):
def check_for_update():
updates = frappe._dict(major=[], minor=[], patch=[])
apps = get_versions()
apps = get_versions()
for app in apps:
app_details = check_release_on_github(app)
@ -143,7 +143,9 @@ def check_for_update():
github_version, org_name = app_details
# Get local instance's current version or the app
instance_version = Version(apps[app]['branch_version'].split(' ')[0])
branch_version = apps[app]['branch_version'].split(' ')[0] if apps[app].get('branch_version', '') else ''
instance_version = Version(branch_version or apps[app].get('version'))
# Compare and popup update message
for update_type in updates:
if github_version.__dict__[update_type] > instance_version.__dict__[update_type]:
@ -224,4 +226,3 @@ def show_update_popup():
if update_message:
frappe.msgprint(update_message, title=_("New updates are available"), indicator='green')
cache.srem("update-user-set", user)