Skip to content

Commit

Permalink
Bugfix with acknowledged_groups
Browse files Browse the repository at this point in the history
  • Loading branch information
tizot committed Jan 28, 2016
1 parent da68238 commit 699f91e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sigma_core/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Group(models.Model):

@property
def acknowledged_groups(self):
return self.group_acknowledgments.filter(validated=True).value('asking_group')
return [ga.asking_group for ga in self.group_acknowledgments.filter(validated=True).select_related('asking_group')]

#################
# Model methods #
Expand Down
1 change: 1 addition & 0 deletions sigma_core/serializers/school.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ class SchoolSerializer(BasicSchoolSerializer):
class Meta:
model = School

acknowledged_groups = serializers.PrimaryKeyRelatedField(read_only=True, many=True)
memberships = serializers.PrimaryKeyRelatedField(read_only=True, many=True)

0 comments on commit 699f91e

Please sign in to comment.