diff --git a/DOSPORTAL/models.py b/DOSPORTAL/models.py index 9d771bc..b8a25cc 100644 --- a/DOSPORTAL/models.py +++ b/DOSPORTAL/models.py @@ -249,6 +249,9 @@ def __str__(self) -> str: def description_formatted(self): return markdownify(self.description) + @property + def formatted_label(self): + return f""" {self.name}""" diff --git a/DOSPORTAL/signals.py b/DOSPORTAL/signals.py index 5c744f3..833289d 100644 --- a/DOSPORTAL/signals.py +++ b/DOSPORTAL/signals.py @@ -92,7 +92,8 @@ def save_record(sender, instance, created = None, **kwargs): new_columns = ['time'] + list(range(df_spectrum.shape[1] - 1)) df_spectrum.columns = new_columns - duration = df_spectrum['time'].max() + df_spectrum['time'] = df_spectrum['time'].astype(float) + duration = df_spectrum['time'].max() - df_spectrum['time'].min() instance.record_duration = datetime.timedelta(seconds=float(duration)) new_name = instance.user_directory_path_data('pk') diff --git a/DOSPORTAL/templates/detectors/detectors_detail.html b/DOSPORTAL/templates/detectors/detectors_detail.html index 406b43c..5039f97 100644 --- a/DOSPORTAL/templates/detectors/detectors_detail.html +++ b/DOSPORTAL/templates/detectors/detectors_detail.html @@ -27,16 +27,19 @@ {%endif%}