Skip to content

Commit

Permalink
fix 500 page on users:
Browse files Browse the repository at this point in the history
'NoneType' object has no attribute 'strftime'

BaseModelView.index_view() got an unexpected keyword argument 'cls'

Flask-SQLAlchemy uses a custom formatter to handle date formatting when displaying data in the templates. It dosn't support overriding the value.
  • Loading branch information
publicarray committed Feb 25, 2024
1 parent 0159658 commit 95fa3c6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions spkrepo/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ def is_accessible(self):
# View
column_list = ("username", "email", "roles", "active", "confirmed_at")

column_formatters = {
"confirmed_at": lambda v, c, m, p: m.confirmed_at.strftime("%Y-%m-%d %H:%M:%S")
}

# Form
form_columns = ("username", "roles", "active")
form_overrides = {"password": PasswordField}
Expand Down

0 comments on commit 95fa3c6

Please sign in to comment.