Cannot add environments to Usage Profile
Closed this issue · 0 comments
weibullguy commented
Describe the bug
Environments cannot be added to a Usage Profile. Attempting to add an environment raises a KeyError exception.
Expected Behavior
As a RAMSTK analyst, I want to be able to add environmental conditions so that I can build a complete Usage Profile.
Actual Behavior
Environments cannot be added.
Reproduce
- Launch RAMSTK
- Open a Program database
- Select the Usage Profile tab in the Revision work book
- Select an existing environment
- Press the 'Add Sibling' button
Logs
Printed to the terminal:
Traceback (most recent call last):
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/ramstk/views/gtk3/usage_profile/view.py", line 180, in _do_request_insert_sibling
pub.sendMessage(
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/pubsub/core/publisher.py", line 216, in sendMessage
topicObj.publish(**msgData)
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/pubsub/core/topicobj.py", line 452, in publish
self.__sendMessage(msgData, topicObj, msgDataSubset)
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/pubsub/core/topicobj.py", line 482, in __sendMessage
listener(data, self, allData)
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/pubsub/core/listener.py", line 237, in __call__
cb(**kwargs)
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/ramstk/models/basemodel.py", line 249, in do_insert
_record = self.do_get_new_record(attributes)
File "/home/drowland/.venvs/ramstk-hh6iB4_W-py3.8/lib/python3.8/site-packages/ramstk/models/programdb/environment/table.py", line 74, in do_get_new_record
_new_record.mission_id = attributes["mission_id"]
KeyError: 'mission_id'
Additional Comments
None
dobranch
priority: blocker
type: fix