Fix for #768 (If email server is configured, admins can send user passwords, also domains can be denied from registration)

Fixes from tests
Fix response opds with read/unread
changed db_reconnect
Changed output for error 500 (now including error message)
Fix in task queue after 20 messages
This commit is contained in:
Ozzieisaacs
2020-01-01 17:29:01 +01:00
parent b586a32843
commit 513ac6cfb4
13 changed files with 2128 additions and 3312 deletions
+8 -2
View File
@@ -33,7 +33,7 @@ from sqlalchemy.ext.declarative import declarative_base
session = None
cc_exceptions = ['datetime', 'comments', 'float', 'composite', 'series']
cc_classes = {}
engine = None
Base = declarative_base()
@@ -288,7 +288,7 @@ class Books(Base):
@property
def atom_timestamp(self):
return (self.timestamp or '').replace(' ', 'T')
return (self.timestamp.strftime('%Y-%m-%dT%H:%M:%S+00:00') or '')
class Custom_Columns(Base):
__tablename__ = 'custom_columns'
@@ -327,6 +327,7 @@ def update_title_sort(config, conn=None):
def setup_db(config):
dispose()
global engine
if not config.config_calibre_dir:
config.invalidate()
@@ -428,3 +429,8 @@ def dispose():
if name.startswith("custom_column_") or name.startswith("books_custom_column_"):
if table is not None:
Base.metadata.remove(table)
def reconnect_db(config):
session.close()
engine.dispose()
setup_db(config)