Skip to content

Commit

Permalink
portia_server: fix: TypeError: _do_load() takes 2 positional arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Apr 15, 2022
1 parent 478b573 commit e69f9ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions portia_server/portia_orm/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def order_keys(self, data):
"""
return OrderedDict((item for item in sorted(iteritems(data))))

def _do_load(self, data, many=None, *args, **kwargs):
def _do_load(self, data, many=None, **kwargs):
# support the case where we have only a single field to load and we get
# it directly rather than wrapped in a dict. this happens when loading
# a relationship with a single field in 'only'
Expand All @@ -82,7 +82,7 @@ def _do_load(self, data, many=None, *args, **kwargs):
data = [self._wrap_only(value) for value in data]

result, errors = super(FileSerializer, self)._do_load(
data, many, *args, **kwargs)
data, many=many, **kwargs)

# we need to wrap the result of a many load in a ModelCollection, but
# post_load(pass_many=True) processors are called before the Model
Expand Down

0 comments on commit e69f9ed

Please sign in to comment.