Skip to content

Commit

Permalink
fix: validation tasks now load on insert (#1009)
Browse files Browse the repository at this point in the history
  • Loading branch information
weibullguy authored Feb 24, 2022
1 parent 67e9bc0 commit 29b52b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
12 changes: 1 addition & 11 deletions src/ramstk/models/programdb/validation/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""Validation Record Model."""

# Standard Library Imports
from datetime import date, datetime, timedelta
from datetime import date, timedelta

# Third Party Imports
# noinspection PyPackageRequirements
Expand Down Expand Up @@ -152,16 +152,6 @@ def get_attributes(self):
time_mean, time_minimum, time_ul, time_variance} pairs.
:rtype: dict
"""
try:
self.date_end = datetime.strftime(self.date_end, "%Y-%m-%d")
except TypeError:
pass

try:
self.date_start = datetime.strftime(self.date_start, "%Y-%m-%d")
except TypeError:
pass

return {
"revision_id": self.revision_id,
"validation_id": self.validation_id,
Expand Down
5 changes: 3 additions & 2 deletions src/ramstk/views/gtk3/validation/panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ def __do_load_validation(
:rtype: :class:`Gtk.TreeIter`
"""
_new_row = None
_date_format = "%Y-%m-%d"

# pylint: disable=unused-variable
_entity = node.data["validation"]
Expand All @@ -706,8 +707,8 @@ def __do_load_validation(
_entity.cost_minimum,
_entity.cost_ul,
_entity.cost_variance,
_entity.date_end,
_entity.date_start,
_entity.date_end.strftime(_date_format),
_entity.date_start.strftime(_date_format),
_entity.description,
self._lst_measurement_units[_entity.measurement_unit],
_entity.name,
Expand Down

0 comments on commit 29b52b2

Please sign in to comment.