From 1d1efdec1bf2e7f483588f8678e0d02eaa560ea7 Mon Sep 17 00:00:00 2001 From: janko Date: Sat, 2 Sep 2023 20:22:57 +0200 Subject: [PATCH] popravki bugov --- import_link.py | 2 +- sr_session.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/import_link.py b/import_link.py index 6d2f839..3145787 100644 --- a/import_link.py +++ b/import_link.py @@ -65,7 +65,7 @@ def commit_link(link, user_id): flash(f"{card.title} imported successfully") dbsession.close() - get_engine().disolve() + get_engine().dispose() return 1 @bp.route('/import_txt', methods = ('GET', 'POST')) diff --git a/sr_session.py b/sr_session.py index 134b735..da61f09 100644 --- a/sr_session.py +++ b/sr_session.py @@ -293,7 +293,7 @@ def sr_session(): card_type = show_card.card_type print("card type: ", card_type) - if card_type == 'PDF': + if card_type == 'PDF' or card_type== None: #these factors should be better packaged return render_template("deck.html", username=username, card=show_card, maybe_in=round(interval*maybe_factor), no_in=round(no_factor*interval)) elif card_type == 'URL':