diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py index 82fd88996..6c449ea32 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/tasks_controller.py @@ -73,8 +73,6 @@ class ReactJsonSchemaSelectOption(TypedDict): enum: list[str] -# TODO: see comment for before_request -# @process_api_blueprint.route("/v1.0/tasks", methods=["GET"]) def task_list_my_tasks( process_instance_id: Optional[int] = None, page: int = 1, per_page: int = 100 ) -> flask.wrappers.Response: @@ -109,6 +107,11 @@ def task_list_my_tasks( _get_potential_owner_usernames(assigned_user) ) + # FIXME: this breaks postgres. Look at commit c147cdb47b1481f094b8c3d82dc502fe961f4977 for + # the postgres fix but it breaks the method for mysql. + # error in postgres: + # psycopg2.errors.GroupingError) column \"process_instance.process_model_identifier\" must + # appear in the GROUP BY clause or be used in an aggregate function human_tasks = human_task_query.add_columns( HumanTaskModel.task_id.label("id"), # type: ignore HumanTaskModel.task_name, diff --git a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py index 98864a8df..b3bb90df2 100644 --- a/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py +++ b/spiffworkflow-backend/tests/spiffworkflow_backend/integration/test_process_api.py @@ -2351,6 +2351,10 @@ class TestProcessApi(BaseTest): assert response.json is not None assert len(response.json["results"]) == 2 + @pytest.mark.skipif( + os.environ.get("SPIFFWORKFLOW_BACKEND_DATABASE_TYPE") == 'postgres', + reason="look at comment in tasks_controller method task_list_my_tasks", + ) def test_correct_user_can_get_and_update_a_task( self, app: Flask,