Skip to content

Commit

Permalink
fix 332: to address column typo asper doc
Browse files Browse the repository at this point in the history
  • Loading branch information
indiVar0508 committed Sep 5, 2022
1 parent 4f80ff6 commit 6bd63ef
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/marshmallow_sqlalchemy/fields.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import warnings
from marshmallow import fields
from marshmallow.utils import is_iterable_but_not_string

Expand Down Expand Up @@ -41,9 +42,16 @@ class Related(fields.Field):
"expected a dictionary with keys {keys!r}"
}

def __init__(self, column=None, **kwargs):
def __init__(self, columns=None, column=None, **kwargs):
if column is not None:
warnings.warn(
"`column` parameter is deprecated and will be removed in future releases. "
"Use `columns` instead.",
DeprecationWarning,
)
columns = column
super().__init__(**kwargs)
self.columns = ensure_list(column or [])
self.columns = ensure_list(columns or [])

@property
def model(self):
Expand Down

0 comments on commit 6bd63ef

Please sign in to comment.