mirror of
https://github.com/sartography/spiffworkflow-backend.git
synced 2025-02-23 21:08:18 +00:00
precommit is passing w/ burnettk
This commit is contained in:
parent
fbbdf7cbcc
commit
3c2ea5f686
@ -1,5 +1,3 @@
|
||||
from __future__ import with_statement
|
||||
|
||||
import logging
|
||||
from logging.config import fileConfig
|
||||
|
||||
|
@ -58,7 +58,10 @@ class ProcessInstanceReportModel(SpiffworkflowBaseDBModel):
|
||||
__tablename__ = "process_instance_report"
|
||||
__table_args__ = (
|
||||
db.UniqueConstraint(
|
||||
"process_group_identifier", "process_model_identifier", "identifier", name="process_instance_report_unique"
|
||||
"process_group_identifier",
|
||||
"process_model_identifier",
|
||||
"identifier",
|
||||
name="process_instance_report_unique",
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -13,7 +13,9 @@ from flask_bpmn.models.db import db
|
||||
from werkzeug.wrappers.response import Response
|
||||
|
||||
from spiffworkflow_backend.models.principal import PrincipalModel
|
||||
from spiffworkflow_backend.models.process_instance_report import ProcessInstanceReportModel
|
||||
from spiffworkflow_backend.models.process_instance_report import (
|
||||
ProcessInstanceReportModel,
|
||||
)
|
||||
from spiffworkflow_backend.models.user import UserModel
|
||||
from spiffworkflow_backend.services.process_instance_processor import (
|
||||
ProcessInstanceProcessor,
|
||||
|
@ -414,26 +414,25 @@ def process_instance_report_list(
|
||||
|
||||
|
||||
def process_instance_report_create(
|
||||
process_group_id: str, process_model_id: str,
|
||||
body: Dict[str, Any]
|
||||
process_group_id: str, process_model_id: str, body: Dict[str, Any]
|
||||
) -> flask.wrappers.Response:
|
||||
"""Process_instance_report_create."""
|
||||
|
||||
ProcessInstanceReportModel.create_report(
|
||||
identifier=body['identifier'],
|
||||
identifier=body["identifier"],
|
||||
process_group_identifier=process_group_id,
|
||||
process_model_identifier=process_model_id,
|
||||
user=g.user,
|
||||
report_metadata=body['report_metadata'],
|
||||
report_metadata=body["report_metadata"],
|
||||
)
|
||||
|
||||
return Response(json.dumps({"ok": True}), status=200, mimetype="application/json")
|
||||
|
||||
|
||||
def process_instance_report_update(
|
||||
process_group_id: str, process_model_id: str,
|
||||
process_group_id: str,
|
||||
process_model_id: str,
|
||||
report_identifier: str,
|
||||
body: Dict[str, Any]
|
||||
body: Dict[str, Any],
|
||||
) -> flask.wrappers.Response:
|
||||
"""Process_instance_report_create."""
|
||||
process_instance_report = ProcessInstanceReportModel.query.filter_by(
|
||||
@ -448,14 +447,15 @@ def process_instance_report_update(
|
||||
status_code=404,
|
||||
)
|
||||
|
||||
process_instance_report.report_metadata = body['report_metadata']
|
||||
process_instance_report.report_metadata = body["report_metadata"]
|
||||
db.session.commit()
|
||||
|
||||
return Response(json.dumps({"ok": True}), status=200, mimetype="application/json")
|
||||
|
||||
|
||||
def process_instance_report_delete(
|
||||
process_group_id: str, process_model_id: str,
|
||||
process_group_id: str,
|
||||
process_model_id: str,
|
||||
report_identifier: str,
|
||||
) -> flask.wrappers.Response:
|
||||
"""Process_instance_report_create."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user