From 49d461d4ac7fecad17f829a86d725d0871f53f32 Mon Sep 17 00:00:00 2001 From: emile Date: Thu, 26 Dec 2024 17:09:57 +0200 Subject: [PATCH] ss --- .../__pycache__/models.cpython-310.pyc | Bin 17029 -> 17289 bytes osinaweb/osinacore/models.py | 9 +++++++++ .../partials/new-status-activity.html | 2 +- .../partials/recent-activities.html | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/osinaweb/osinacore/__pycache__/models.cpython-310.pyc b/osinaweb/osinacore/__pycache__/models.cpython-310.pyc index 4541d350a432622fb67d61ce509e9d522d99741f..73457085523f5bfd376be86a3418840fe3ba39f0 100644 GIT binary patch delta 549 zcmXw$!D|yi6vpRGC)w?~yKc8Jh6vK&#RU`T32?82AVqr&_6YqjereBP{wh_ nsNTNXhhN>*Yc22ulDHd%_Ngkq&1rr1`uym53;YwlkvIPVB_ns# delta 281 zcmeBdXKZa{>I4s{Tb{|wZ+l97R-SOm!6U|?b7VG&~#V&nrt4n`)X$*Hz; zC2uihrWEl4Y%fiG4)WO2Y_D_U`)_gC$F_zE6xH`bp@o718k1~BM+kpV-X8b%@0X7p!jW&9LOUa3_L(N9!4p~ xA~v`Q^Brz6KHgmA*vKfr3{+SIGOY-ttte`8po92iCFeL!c`imFZXtFt4gh%eK$!pl diff --git a/osinaweb/osinacore/models.py b/osinaweb/osinacore/models.py index e10ff5e1..4827cf84 100644 --- a/osinaweb/osinacore/models.py +++ b/osinaweb/osinacore/models.py @@ -452,6 +452,15 @@ class Status(models.Model): else: return self.date_time.strftime('%d %m %Y, %I:%M %p') + @property + def project(self): + if self.type == 'Task' and self.type_id: + try: + task = Task.objects.get(id=self.type_id) + return task.project.id + except Task.DoesNotExist: + return None + return None @receiver(post_save, sender=Status) def new_ticket_update_handler(sender, instance, created, **kwargs): diff --git a/osinaweb/osinacore/templates/details_templates/partials/new-status-activity.html b/osinaweb/osinacore/templates/details_templates/partials/new-status-activity.html index f49c08c7..60332a81 100644 --- a/osinaweb/osinacore/templates/details_templates/partials/new-status-activity.html +++ b/osinaweb/osinacore/templates/details_templates/partials/new-status-activity.html @@ -178,7 +178,7 @@

{{status.text}}

{% if status.type and status.type_id %} - +