feat(itam): save_history method added to Software Version
ref: #605 #625
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user