feat(itam): save_history method added to Software Version

ref: #605 #625
This commit is contained in:
2025-02-16 23:37:38 +09:30
parent 4c14e6db3f
commit e04e3e4572

View File

@ -404,16 +404,29 @@ class SoftwareVersion(SoftwareCommonFields, SaveHistory):
} }
@property # @property
def parent_object(self): # def parent_object(self):
""" Fetch the parent object """ # """ Fetch the parent object """
return self.software # return self.software
def __str__(self): def __str__(self):
return self.name return self.name
def save_history(self, before: dict, after: dict) -> bool:
from itam.models.software_version_history import SoftwareVersionHistory
history = super().save_history(
before = before,
after = after,
history_model = SoftwareVersionHistory,
)
return history