diff --git a/docs/en_US/release_notes_5_0.rst b/docs/en_US/release_notes_5_0.rst index d4f4d79ae..41e3ec617 100644 --- a/docs/en_US/release_notes_5_0.rst +++ b/docs/en_US/release_notes_5_0.rst @@ -27,3 +27,4 @@ Bug fixes | `Issue #6177 `_ - Fixed an issue while downloading ERD images in Safari and Firefox. | `Issue #6179 `_ - Fixed an issue where Generate SQL displayed twice in the ERD tool. | `Issue #6180 `_ - Updated missing documentation for the 'Download Image' option in ERD. +| `Issue #6187 `_ - Limit the upgrade check to run once per day. \ No newline at end of file diff --git a/web/pgadmin/browser/__init__.py b/web/pgadmin/browser/__init__.py index 2e4606281..9b1c99fc5 100644 --- a/web/pgadmin/browser/__init__.py +++ b/web/pgadmin/browser/__init__.py @@ -18,6 +18,7 @@ from socket import error as SOCKETErrorException from urllib.request import urlopen import six +import time from flask import current_app, render_template, url_for, make_response, \ flash, Response, request, after_this_request, redirect, session from flask_babelex import gettext @@ -35,7 +36,7 @@ from werkzeug.datastructures import MultiDict import config from pgadmin import current_blueprint -from pgadmin.settings import get_setting +from pgadmin.settings import get_setting, store_setting from pgadmin.utils import PgAdminModule from pgadmin.utils.ajax import make_json_response from pgadmin.utils.csrf import pgCSRFProtect @@ -693,7 +694,11 @@ def index(): # Get the current version info from the website, and flash a message if # the user is out of date, and the check is enabled. if config.UPGRADE_CHECK_ENABLED: - check_browser_upgrade() + last_check = get_setting('LastUpdateCheck', default='0') + today = time.strftime('%Y%m%d') + if int(last_check) < int(today): + check_browser_upgrade() + store_setting('LastUpdateCheck', today) auth_only_internal = False auth_source = []