diff options
author | Étienne Loks <etienne.loks@proxience.com> | 2014-05-12 22:57:10 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@proxience.com> | 2014-05-12 22:57:10 +0200 |
commit | 46c52f0ce3f76bc8abe5f47318f8304cdc368fa3 (patch) | |
tree | 1fe20946674dab9319b44ae705dbcab90bfeed6c /ishtar_common/models.py | |
parent | 18a6ad99164350af62d65efd6a1fd1aa4c419739 (diff) | |
download | Ishtar-46c52f0ce3f76bc8abe5f47318f8304cdc368fa3.tar.bz2 Ishtar-46c52f0ce3f76bc8abe5f47318f8304cdc368fa3.zip |
Fix created by fields on sheets (refs #1590)
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r-- | ishtar_common/models.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 4e05a115f..1aaaf933a 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -453,17 +453,6 @@ class BaseHistorizedItem(models.Model): except IndexError: return - @property - def created_by(self): - q = self.history.order_by('history_date') - if not q.count(): - return - try: - modifier = IshtarUser.objects.get(pk=q.all()[0].history_modifier_id) - return modifier.person - except IshtarUser.DoesNotExist: - return - def rollback(self, date): """ Rollback to a previous state @@ -882,6 +871,9 @@ class IshtarUser(User): def has_right(self, right_name): return self.person.has_right(right_name) + def full_label(self): + return self.person.full_label() + class AuthorType(GeneralType): class Meta: verbose_name = _(u"Author type") |