Skip to content

Commit

Permalink
Merge pull request #12 from timlinux/master
Browse files Browse the repository at this point in the history
get_all_attribute_slugs bug fix
  • Loading branch information
katembu committed Apr 5, 2012
2 parents 17a0bf4 + c373704 commit 24be357
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions eav/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ class Attribute(models.Model):
number of children, number of patients, has fever?, etc...
Each attribute has a name, and a description, along with a slug that must
be unique. If you don't provide a slug, a default slug (derrived from
be unique. If you don't provide a slug, a default slug (derived from
name), will be created.
The *required* field is a boolean that indicates whether this EAV attribute
is required for entitys to which it applies. It defaults to *False*.
is required for entities to which it applies. It defaults to *False*.
.. warning::
Just like a normal model field that is required, you will not be able
Expand Down Expand Up @@ -485,7 +485,7 @@ def get_all_attribute_slugs(self):
'''
Returns a list of slugs for all attributes available to this entity.
'''
return self.get_all_attributes().values_list('slug', Flat=True)
return self.get_all_attributes().values_list('slug', flat=True)

def get_attribute_by_slug(self, slug):
'''
Expand Down

0 comments on commit 24be357

Please sign in to comment.