Skip to content

Commit

Permalink
Merge pull request #2383 from macnewbold/bugfix-lazy_gettext-placeholder
Browse files Browse the repository at this point in the history
Fixes #1728
  • Loading branch information
alanhamlett authored Oct 15, 2023
2 parents 11e828a + ef55323 commit c10d2d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions flask_admin/contrib/sqla/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,10 +624,10 @@ class MyModelView(BaseModelView):
for searchable in self.column_searchable_list:
if isinstance(searchable, InstrumentedAttribute):
placeholders.append(
self.column_labels.get(searchable.key, searchable.key))
str(self.column_labels.get(searchable.key, searchable.key)))
else:
placeholders.append(
self.column_labels.get(searchable, searchable))
str(self.column_labels.get(searchable, searchable)))

return u', '.join(placeholders)

Expand Down
2 changes: 1 addition & 1 deletion flask_admin/form/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __call__(self, form, form_opts=None, field_args={}):
result = []

for r in self.rules:
result.append(r(form, form_opts, field_args))
result.append(str(r(form, form_opts, field_args)))

return Markup(self.separator.join(result))

Expand Down

0 comments on commit c10d2d3

Please sign in to comment.