diff --git a/src/marshmallow_union/__init__.py b/src/marshmallow_union/__init__.py
index 22d5ef4..ee47920 100644
--- a/src/marshmallow_union/__init__.py
+++ b/src/marshmallow_union/__init__.py
@@ -13,6 +13,7 @@ class MarshmallowUnionException(Exception):
 
 class ExceptionGroup(MarshmallowUnionException):
     """Collection of possibly multiple exceptions."""
+
     def __init__(self, msg: str, errors):
         self.msg = msg
         self.errors = errors
@@ -63,8 +64,8 @@ class Union(marshmallow.fields.Field):
         for candidate_field in fields:
 
             try:
-                return candidate_field.serialize(
-                    attr, obj, error_store=error_store, **kwargs
+                return candidate_field._serialize(
+                    value, attr, obj, error_store=error_store, **kwargs
                 )
             except ValueError as e:
                 error_store.store_error({attr: e})

_serialize ignores the given value
The `_serialize` method of `Union` calls the `serialize` method (instead of `_serialize`) on the underlying fields. This means that it ignores the given `value` parameter, and may try to serialize a completely different value.

See: https://github.com/adamboche/python-marshmallow-union/blob/master/src/marshmallow_union/__init__.py#L66-L68

Initially reported in: https://github.com/lovasoa/marshmallow_dataclass/issues/67
diff --git a/tests/test_union.py b/tests/test_union.py
index 6377c06..c93f004 100644
--- a/tests/test_union.py
+++ b/tests/test_union.py
@@ -52,6 +52,14 @@ class IntStrSchema(marshmallow.Schema):
     x = marshmallow_union.Union([marshmallow.fields.Int(), marshmallow.fields.String()])
 
 
+class ListUnionSchema(marshmallow.Schema):
+    """Schema with a list of unions."""
+
+    l = marshmallow.fields.List(
+        marshmallow_union.Union([marshmallow.fields.Int(), marshmallow.fields.String()])
+    )
+
+
 @pytest.mark.parametrize(
     "data, schema",
     [
@@ -59,6 +67,7 @@ class IntStrSchema(marshmallow.Schema):
         ({"name": "Alice", "number_or_numbers": [25, 50]}, PersonSchema()),
         ({"name": "Alice", "number_or_numbers": [25, 50]}, OtherSchema()),
         ({"x": 5}, IntStrSchema()),
+        ({"l": ["h", 5, "n", 1]}, ListUnionSchema()),
         ({"x": "hello"}, IntStrSchema()),
         ({"items": {"a": 42, "b": [17]}}, MappingSchema()),
     ],

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio pytest
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
certifi==2021.5.30
coverage==6.2
execnet==1.9.0
importlib-metadata==4.8.3
iniconfig==1.1.1
marshmallow==3.2.1
-e git+https://github.com/adamboche/python-marshmallow-union.git@58bfc9fb069e00478afba87da3e003464cbdaebe#egg=marshmallow_union
packaging==21.3
pluggy==1.0.0
py==1.11.0
pyparsing==3.1.4
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==4.0.0
pytest-mock==3.6.1
pytest-xdist==3.0.2
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: python-marshmallow-union
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - coverage==6.2
      - execnet==1.9.0
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - marshmallow==3.2.1
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==4.0.0
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/python-marshmallow-union

tests/test_union.py::test_round_trip[data4-schema4]
tests/test_union.py::test_round_trip[data0-schema0] tests/test_union.py::test_round_trip[data1-schema1] tests/test_union.py::test_round_trip[data2-schema2] tests/test_union.py::test_round_trip[data3-schema3] tests/test_union.py::test_round_trip[data5-schema5] tests/test_union.py::test_round_trip[data6-schema6] tests/test_union.py::test_load_raises[data0-schema0] tests/test_union.py::test_load_raises[data1-schema1] tests/test_union.py::test_load_raises[data2-schema2] tests/test_union.py::test_dump_raises[data0-schema0] tests/test_union.py::test_dump_raises[data1-schema1] tests/test_union.py::test_dump_raises[data2-schema2]
src/marshmallow_union/__init__.py
src/marshmallow_union/__init__.py