Skip to content

Commit 62ae241

Browse files
bluetechlovelydinosaur
authored andcommitted
Remove outdated comment in SerializerMethodField (#7110)
Since 91ea138.
1 parent d985c7c commit 62ae241

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

rest_framework/fields.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,14 +1889,9 @@ def __init__(self, method_name=None, **kwargs):
18891889
super().__init__(**kwargs)
18901890

18911891
def bind(self, field_name, parent):
1892-
# In order to enforce a consistent style, we error if a redundant
1893-
# 'method_name' argument has been used. For example:
1894-
# my_field = serializer.SerializerMethodField(method_name='get_my_field')
1895-
default_method_name = 'get_{field_name}'.format(field_name=field_name)
1896-
1897-
# The method name should default to `get_{field_name}`.
1892+
# The method name defaults to `get_{field_name}`.
18981893
if self.method_name is None:
1899-
self.method_name = default_method_name
1894+
self.method_name = 'get_{field_name}'.format(field_name=field_name)
19001895

19011896
super().bind(field_name, parent)
19021897

0 commit comments

Comments
 (0)