(
session,
project_id,
active_only = None,
archived = False,
trigger_type = None,
limit = 100,
return_kind = "objects"
)
| 173 | |
| 174 | @staticmethod |
| 175 | def list( |
| 176 | session, |
| 177 | project_id, |
| 178 | active_only = None, |
| 179 | archived = False, |
| 180 | trigger_type = None, |
| 181 | limit = 100, |
| 182 | return_kind = "objects" |
| 183 | ): |
| 184 | """ |
| 185 | |
| 186 | """ |
| 187 | |
| 188 | query = session.query(Workflow).filter( |
| 189 | Workflow.archived == False, |
| 190 | Workflow.project_id == project_id) |
| 191 | |
| 192 | if active_only is True: |
| 193 | query = query.filter(Workflow.active == True) |
| 194 | |
| 195 | if trigger_type is not None: |
| 196 | query = query.filter(Workflow.trigger_type == trigger_type) |
| 197 | |
| 198 | if return_kind == "count": |
| 199 | return query.limit(limit).count() |
| 200 | |
| 201 | if return_kind == "objects": |
| 202 | return query.order_by(Workflow.time_created).limit(limit).all() |
| 203 | |
| 204 | @staticmethod |
| 205 | def update_string_id( |
no test coverage detected