fix all deprecation warnings

This commit is contained in:
burnettk 2023-03-16 22:42:35 -04:00
parent 4b96a0c453
commit c4acbab343
4 changed files with 6 additions and 4 deletions

View File

@ -127,7 +127,9 @@ filterwarnings = [
"ignore:'_request_ctx_stack' is deprecated and will be removed in Flask 2.3",
"ignore:Setting 'json_encoder' on the app or a blueprint is deprecated and will be removed in Flask 2.3",
"ignore:'JSONEncoder' is deprecated and will be removed in Flask 2.3",
"ignore:'app.json_encoder' is deprecated and will be removed in Flask 2.3"
"ignore:'app.json_encoder' is deprecated and will be removed in Flask 2.3",
# SpiffWorkflow/bpmn/PythonScriptEngineEnvironment.py
'ignore:The usage of Box has been deprecated'
]
[tool.coverage.paths]

View File

@ -29,7 +29,7 @@ class BpmnProcessModel(SpiffworkflowBaseDBModel):
properties_json: dict = db.Column(db.JSON, nullable=False)
json_data_hash: str = db.Column(db.String(255), nullable=False, index=True)
tasks = relationship("TaskModel", cascade="delete") # type: ignore
tasks = relationship("TaskModel", back_populates="bpmn_process", cascade="delete") # type: ignore
# subprocess or top_level_process
# process_type: str = db.Column(db.String(30), nullable=False)

View File

@ -30,4 +30,4 @@ class HumanTaskUserModel(SpiffworkflowBaseDBModel):
human_task_id = db.Column(ForeignKey(HumanTaskModel.id), nullable=False, index=True) # type: ignore
user_id = db.Column(ForeignKey(UserModel.id), nullable=False, index=True) # type: ignore
human_task = relationship(HumanTaskModel)
human_task = relationship(HumanTaskModel, back_populates="human_task_users")

View File

@ -50,7 +50,7 @@ class TaskModel(SpiffworkflowBaseDBModel):
id: int = db.Column(db.Integer, primary_key=True)
guid: str = db.Column(db.String(36), nullable=False, unique=True, index=True)
bpmn_process_id: int = db.Column(ForeignKey(BpmnProcessModel.id), nullable=False) # type: ignore
bpmn_process = relationship(BpmnProcessModel)
bpmn_process = relationship(BpmnProcessModel, back_populates="tasks")
process_instance_id: int = db.Column(ForeignKey("process_instance.id"), nullable=False)
# find this by looking up the "workflow_name" and "task_spec" from the properties_json