(username: str, is_admin: bool)
| 15503 | except Exception: |
| 15504 | pass |
| 15505 | conn.execute("DELETE FROM group_voice WHERE id=?", (vid,)) |
| 15506 | conn.commit() |
| 15507 | conn.close() |
| 15508 | raise ValueError("too_large") |
| 15509 | except Exception: |
| 15510 | conn.close() |
| 15511 | raise |
| 15512 | |
| 15513 | conn.execute("UPDATE group_voice SET stored_path=? WHERE id=?", (stored_path, vid)) |
| 15514 | conn.commit() |
| 15515 | conn.close() |
| 15516 | return vid, mime |
| 15517 | |
| 15518 | |
| 15519 | _save_plain_upload(file_storage, tmp_plain) |
| 15520 | |
| 15521 | def finalize(ok: bool, err: Optional[str]): |
| 15522 | """finalize. |
| 15523 | |
| 15524 | Route handler or application helper. |
| 15525 | |
| 15526 | This docstring was expanded to make future maintenance easier. |
| 15527 | |
| 15528 | Args: |
| 15529 | ok: Parameter. |
| 15530 | err: Parameter. |
| 15531 | |
| 15532 | Returns: |
| 15533 | Varies. |
| 15534 | """ |
| 15535 | c = db_connect() |
| 15536 | if ok and os.path.exists(stored_path): |
no test coverage detected