Skip to content

Commit

Permalink
Corrected an example in the natural key serialization docs. Thanks to…
Browse files Browse the repository at this point in the history
… Alex Gaynor for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11907 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
freakboy3742 committed Dec 18, 2009
1 parent f96f630 commit ebb8ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/serialization.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ name::

class PersonManager(models.Manager):
def get_by_natural_key(self, first_name, last_name):
return self.filter(first_name=first_name, last_name=last_name)
return self.get(first_name=first_name, last_name=last_name)

class Person(models.Model):
objects = PersonManager()
Expand Down

0 comments on commit ebb8ca1

Please sign in to comment.