allow updating primary_file_name and primary_process_id from process model update

This commit is contained in:
burnettk 2022-10-10 22:18:28 -04:00
parent eb46fb7d28
commit fb572c99e8
2 changed files with 8 additions and 2 deletions

View File

@ -206,7 +206,7 @@ def process_model_update(
process_group_id: str, process_model_id: str, body: Dict[str, Union[str, bool, int]]
) -> Any:
"""Process_model_update."""
body_include_list = ["display_name"]
body_include_list = ["display_name", "primary_file_name", "primary_process_id"]
body_filtered = {
include_item: body[include_item] for include_item in body_include_list
}

View File

@ -179,9 +179,13 @@ class TestProcessApi(BaseTest):
assert process_model.id == "make_cookies"
assert process_model.display_name == "Cooooookies"
assert process_model.is_review is False
assert process_model.primary_file_name is None
assert process_model.primary_process_id is None
process_model.display_name = "Updated Display Name"
process_model.is_review = True
process_model.primary_file_name = "superduper.bpmn"
process_model.primary_process_id = "superduper"
process_model.is_review = True # not in the include list, so get ignored
user = self.find_or_create_user()
response = client.put(
@ -193,6 +197,8 @@ class TestProcessApi(BaseTest):
assert response.status_code == 200
assert response.json is not None
assert response.json["display_name"] == "Updated Display Name"
assert response.json["primary_file_name"] == "superduper.bpmn"
assert response.json["primary_process_id"] == "superduper"
assert response.json["is_review"] is False
def test_process_model_list(