Skip to content

Commit

Permalink
Fixed inconsistent spacing in core/meta/fields.py
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
adrianholovaty committed Dec 9, 2005
1 parent cecd295 commit 9e2b463
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django/core/meta/fields.py
Expand Up @@ -327,7 +327,7 @@ def _get_val_from_obj(self, obj):
else:
return self.get_default()

def flatten_data(self, follow, obj = None):
def flatten_data(self, follow, obj=None):
"""
Returns a dictionary mapping the field's manipulator field names to its
"flattened" string values for the admin view. obj is the instance to
Expand Down Expand Up @@ -724,7 +724,7 @@ def get_db_prep_save(self,value):
else:
return self.rel.get_related_field().get_db_prep_save(value)

def flatten_data(self, follow, obj = None):
def flatten_data(self, follow, obj=None):
if not obj:
# In required many-to-one fields with only one available choice,
# select that one available choice. Note: We have to check that
Expand All @@ -733,7 +733,7 @@ def flatten_data(self, follow, obj = None):
if not self.blank and not self.rel.raw_id_admin and self.choices:
choice_list = self.get_choices_default()
if len(choice_list) == 2:
return { self.attname : choice_list[1][0] }
return {self.attname: choice_list[1][0]}
return Field.flatten_data(self, follow, obj)

class ManyToManyField(Field):
Expand Down

0 comments on commit 9e2b463

Please sign in to comment.