diff --git a/svs/models.py b/svs/models.py index e088c59e3..601692b1e 100644 --- a/svs/models.py +++ b/svs/models.py @@ -1,6 +1,8 @@ import uuid as uuid_object from datetime import datetime, timedelta +from django.utils.timezone import localtime + from varfish.utils import JSONField from variants.helpers import get_engine from bgjobs.models import BackgroundJob, JobModelMessageMixin @@ -308,6 +310,9 @@ class _UserAnnotation(models.Model): def get_variant_description(self): return "({}) chr{}:{}-{}".format(self.sv_type, self.chromosome, self.start, self.end) + def get_date_created(self): + return localtime(self.date_created).strftime("%Y-%m-%d %H:%M") + class Meta: abstract = True indexes = (models.Index(fields=["case", "release", "bin"]),) diff --git a/variants/templates/variants/case/detail_annotation.html b/variants/templates/variants/case/detail_annotation.html index bf8d98630..84e2c9762 100644 --- a/variants/templates/variants/case/detail_annotation.html +++ b/variants/templates/variants/case/detail_annotation.html @@ -316,7 +316,7 @@

{{ comment|keyvalue:"username" }} - {{ comment|keyvalue:"date_created"|date:"Y/m/d H:i" }}: + {{ comment|keyvalue:"date_created" }}: {{ comment|keyvalue:"text" }} {# {% if comment|keyvalue:"user" == request.user or request.user.is_superuser %}#}