Skip to content

Commit 8758b42

Browse files
author
Henry Walshaw
committed
Don't forget the serialization alias!
1 parent 21316e7 commit 8758b42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pydantic_csv/basemodel_csv_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(
5353
self._use_alias = use_alias
5454

5555
if self._use_alias:
56-
self._fieldnames = [field.alias or name for name, field in fields.items()]
56+
self._fieldnames = [field.alias or field.serialization_alias or name for name, field in fields.items()]
5757
else:
5858
self._fieldnames = fields.keys()
5959

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pydantic-csv"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "convert CSV to pydantic.BaseModel and vice versa"
55
authors = ["Nathan Richard <contact@nathanrichard.dev>"]
66
license = "LICENSE"

0 commit comments

Comments
 (0)