Splits the liveaction into an ActionExecution compatible dict.
(liveaction_db)
| 79 | |
| 80 | |
| 81 | def _decompose_liveaction(liveaction_db): |
| 82 | """ |
| 83 | Splits the liveaction into an ActionExecution compatible dict. |
| 84 | """ |
| 85 | decomposed = {"liveaction": {}} |
| 86 | liveaction_api = vars(LiveActionAPI.from_model(liveaction_db)) |
| 87 | for k in liveaction_api.keys(): |
| 88 | if k in LIVEACTION_ATTRIBUTES: |
| 89 | decomposed["liveaction"][k] = liveaction_api[k] |
| 90 | else: |
| 91 | decomposed[k] = getattr(liveaction_db, k) |
| 92 | return decomposed |
| 93 | |
| 94 | |
| 95 | def _create_execution_log_entry(status, timestamp=None): |
no test coverage detected