~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/database.py

Add an Assessed.principal property.

Show diffs side-by-side

added added

removed removed

Lines of Context:
592
592
        return "<%s %r in %r>" % (type(self).__name__,
593
593
            self.user or self.project_group, self.project)
594
594
 
 
595
    @property
 
596
    def principal(self):
 
597
        return self.project_group or self.user
 
598
 
595
599
    @classmethod
596
600
    def get(cls, store, principal, project):
597
601
        """Find or create an Assessed for the given user or group and project.