feat(itam): save_history method added to Operating System Version

ref: #605 #622
This commit is contained in:
2025-02-16 23:21:23 +09:30
parent f954b2507c
commit ec06c417e1

View File

@ -282,14 +282,27 @@ class OperatingSystemVersion(OperatingSystemCommonFields, SaveHistory):
}
@property
def parent_object(self):
""" Fetch the parent object """
# @property
# def parent_object(self):
# """ Fetch the parent object """
return self.operating_system
# return self.operating_system
def __str__(self):
return self.operating_system.name + ' ' + self.name
def save_history(self, before: dict, after: dict) -> bool:
from itam.models.operating_system_version_history import OperatingSystemVersionHistory
history = super().save_history(
before = before,
after = after,
history_model = OperatingSystemVersionHistory,
)
return history