Skip to content

Commit

Permalink
Merge pull request #2320 from Zasgard/master
Browse files Browse the repository at this point in the history
Fixes missing parameters for InlineHstoreList
  • Loading branch information
alanhamlett authored Oct 15, 2023
2 parents 073766a + 6443a3e commit a15cbb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask_admin/contrib/sqla/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,13 @@ def __init__(self, key=None, value=None):
class InlineHstoreList(InlineFieldList):
""" Version of InlineFieldList for use with Postgres HSTORE columns """

def process(self, formdata, data=unset_value):
def process(self, formdata, data=unset_value, extra_filters=None):
""" SQLAlchemy returns a dict for HSTORE columns, but WTForms cannot
process a dict. This overrides `process` to convert the dict
returned by SQLAlchemy to a list of classes before processing. """
if isinstance(data, dict):
data = [KeyValue(k, v) for k, v in iteritems(data)]
super(InlineHstoreList, self).process(formdata, data)
super(InlineHstoreList, self).process(formdata, data, extra_filters)

def populate_obj(self, obj, name):
""" Combines each FormField key/value into a dictionary for storage """
Expand Down

0 comments on commit a15cbb4

Please sign in to comment.