mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Fixed #4040 -- Changed uses of has_key() to "in". Slight performance
improvement and forward-compatible with future Python releases. Patch from Gary Wilson. git-svn-id: http://code.djangoproject.com/svn/django/trunk@5091 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -329,7 +329,7 @@ class FormField(object):
|
||||
|
||||
def convert_post_data(self, new_data):
|
||||
name = self.get_member_name()
|
||||
if new_data.has_key(self.field_name):
|
||||
if self.field_name in new_data:
|
||||
d = new_data.getlist(self.field_name)
|
||||
try:
|
||||
converted_data = [self.__class__.html2python(data) for data in d]
|
||||
|
||||
Reference in New Issue
Block a user