Fix updater

Bugfixes from testruns
Update Testresults
This commit is contained in:
Ozzie Isaacs 2021-03-24 18:45:59 +01:00
parent 2b17bf4114
commit f4e134742b
5 changed files with 818 additions and 2229 deletions

View File

@ -42,6 +42,7 @@ except NameError:
oauth_check = {} oauth_check = {}
oauthblueprints = []
oauth = Blueprint('oauth', __name__) oauth = Blueprint('oauth', __name__)
log = logger.create() log = logger.create()
@ -203,7 +204,6 @@ def unlink_oauth(provider):
return redirect(url_for('web.profile')) return redirect(url_for('web.profile'))
def generate_oauth_blueprints(): def generate_oauth_blueprints():
oauthblueprints = []
if not ub.session.query(ub.OAuthProvider).count(): if not ub.session.query(ub.OAuthProvider).count():
for provider in ("github", "google"): for provider in ("github", "google"):
oauthProvider = ub.OAuthProvider() oauthProvider = ub.OAuthProvider()

View File

@ -222,7 +222,7 @@ $(function() {
function updateTimer() { function updateTimer() {
$.ajax({ $.ajax({
dataType: "json", dataType: "json",
url: window.location.pathname + "/get_updater_status", url: window.location.pathname + "/../../get_updater_status",
success: function success(data) { success: function success(data) {
// console.log(data.status); // console.log(data.status);
$("#DialogContent").html(updateText[data.status]); $("#DialogContent").html(updateText[data.status]);

View File

@ -31,12 +31,12 @@ from flask_login import AnonymousUserMixin, current_user
try: try:
from flask_dance.consumer.backend.sqla import OAuthConsumerMixin from flask_dance.consumer.backend.sqla import OAuthConsumerMixin
oauth_support = True oauth_support = True
except ImportError: except ImportError as e:
# fails on flask-dance >1.3, due to renaming # fails on flask-dance >1.3, due to renaming
try: try:
from flask_dance.consumer.storage.sqla import OAuthConsumerMixin from flask_dance.consumer.storage.sqla import OAuthConsumerMixin
oauth_support = True oauth_support = True
except ImportError: except ImportError as e:
oauth_support = False oauth_support = False
from sqlalchemy import create_engine, exc, exists, event, text from sqlalchemy import create_engine, exc, exists, event, text
from sqlalchemy import Column, ForeignKey from sqlalchemy import Column, ForeignKey

View File

@ -9,7 +9,7 @@ iso-639>=0.4.5,<0.5.0
PyPDF3>=1.0.0,<1.0.4 PyPDF3>=1.0.0,<1.0.4
pytz>=2016.10 pytz>=2016.10
requests>=2.11.1,<2.25.0 requests>=2.11.1,<2.25.0
SQLAlchemy>=1.3.0,<1.5.0 SQLAlchemy>=1.3.0,<1.5.0 # oauth fails on 1.4+ due to import problems in flask_dance
tornado>=4.1,<6.2 tornado>=4.1,<6.2
Wand>=0.4.4,<0.7.0 Wand>=0.4.4,<0.7.0
unidecode>=0.04.19,<1.2.0 unidecode>=0.04.19,<1.2.0

File diff suppressed because it is too large Load Diff