diff --git a/cps/admin.py b/cps/admin.py index d20a0100..6bf046cf 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -969,7 +969,7 @@ def reset_user_password(user_id): if current_user is not None and current_user.is_authenticated: ret, message = reset_password(user_id) if ret == 1: - log.debug(u"Password for user %(user)s reset", user=message) + log.debug(u"Password for user %s reset", message) flash(_(u"Password for user %(user)s reset", user=message), category="success") elif ret == 0: log.error(u"An unknown error occurred. Please try again later.") diff --git a/cps/templates/email_edit.html b/cps/templates/email_edit.html index 997909c2..bce3bc21 100644 --- a/cps/templates/email_edit.html +++ b/cps/templates/email_edit.html @@ -47,6 +47,7 @@ {{_('Cancel')}} {% if g.allow_registration %} +

{{_('Allowed Domains (Whitelist)')}}

@@ -81,6 +82,7 @@
+
{% endif %} diff --git a/cps/ub.py b/cps/ub.py index cfedf360..57aee968 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -501,6 +501,10 @@ def migrate_Database(session): conn.execute("ALTER TABLE book_read_link ADD column 'last_time_started_reading' DATETIME") conn.execute("ALTER TABLE book_read_link ADD column 'times_started_reading' INTEGER DEFAULT 0") session.commit() + test = session.query(ReadBook).filter(ReadBook.last_modified == None).all() + for book in test: + book.last_modified = datetime.datetime.utcnow() + session.commit() try: session.query(exists().where(Shelf.uuid)).scalar() except exc.OperationalError: @@ -559,6 +563,7 @@ def migrate_Database(session): conn.execute("ALTER TABLE user ADD column `allowed_tags` String DEFAULT ''") conn.execute("ALTER TABLE user ADD column `denied_column_value` DEFAULT ''") conn.execute("ALTER TABLE user ADD column `allowed_column_value` DEFAULT ''") + session.commit() try: session.query(exists().where(User.series_view)).scalar() except exc.OperationalError: