Skip to content

Commit

Permalink
Merge pull request #19 from ProjetSigma/feature/110-group-creation
Browse files Browse the repository at this point in the history
Change field names in AcknowledgedGroup
  • Loading branch information
tizot committed Feb 1, 2016
2 parents 203d730 + ba267d5 commit 29ed934
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sigma_core/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ def has_object_invite_permission(self, request):


class GroupAcknowledgment(models.Model):
asking_group = models.ForeignKey(Group, related_name='group_recognizers')
validator_group = models.ForeignKey(Group, related_name='group_acknowledgments')
subgroup = models.ForeignKey(Group, related_name='group_parents')
parent_group = models.ForeignKey(Group, related_name='subgroups')
validated = models.BooleanField(default=False)
created = models.DateTimeField(auto_now_add=True)
updated = models.DateTimeField(auto_now=True)

def __str__(self):
if self.validated:
return "Group %s acknowledged by Group %s" % (self.asking_group.__str__(), self.validator_group.__str__())
return "Group %s acknowledged by Group %s" % (self.subgroup.__str__(), self.parent_group.__str__())
else:
return "Group %s awaiting for acknowledgment by Group %s since %s" % (self.asking_group.__str__(), self.validator_group.__str__(), self.created.strftime("%Y-%m-%d %H:%M"))
return "Group %s awaiting for acknowledgment by Group %s since %s" % (self.subgroup.__str__(), self.parent_group.__str__(), self.created.strftime("%Y-%m-%d %H:%M"))

0 comments on commit 29ed934

Please sign in to comment.