profiler_att_delete. Route handler or application helper. This docstring was expanded to make future maintenance easier. Args: aid: Parameter. Returns: Varies.
(aid: int)
| 16437 | item = { |
| 16438 | "id": r["id"], |
| 16439 | "owner": r["owner"], |
| 16440 | "first": first, |
| 16441 | "last": last, |
| 16442 | "bounty_price": (float(r["bounty_price"]) if r["bounty_price"] is not None else None), |
| 16443 | "bounty_set_by": r["bounty_set_by"], |
| 16444 | "bounty_updated_at": r["bounty_updated_at"], |
| 16445 | "bounty_reason": (r["bounty_reason"] if "bounty_reason" in r.keys() else None), |
| 16446 | } |
| 16447 | item["bounty_price_display"] = _fmt_bounty_price(item["bounty_price"]) if item["bounty_price"] is not None else "" |
| 16448 | item["bounty_reason"] = (item.get("bounty_reason") or "").strip() |
| 16449 | if q: |
| 16450 | blob = f'{item["id"]} {item["owner"]} {first} {last}'.lower() |
| 16451 | if q not in blob: |
| 16452 | continue |
| 16453 | out.append(item) |
| 16454 | return out |
| 16455 | |
| 16456 | |
| 16457 | |
| 16458 | def _face_detector_bounty_preview_source(eid: int) -> Optional[Dict[str, Any]]: |
| 16459 | """Return the best available image source for a bounty profiler entry. |
| 16460 | |
| 16461 | This is for manual side-by-side review only. It does not perform any |
| 16462 | biometric comparison or matching. |
| 16463 | """ |
| 16464 | conn = db_connect() |
| 16465 | row = conn.execute( |
| 16466 | "SELECT id, owner, bounty_price FROM profiler_entries WHERE id=?", |
| 16467 | (eid,), |
| 16468 | ).fetchone() |
| 16469 | if not row or row["bounty_price"] is None: |
| 16470 | conn.close() |
| 16471 | return None |
| 16472 | |
| 16473 | att_rows = conn.execute( |
| 16474 | "SELECT id, filename_enc, mime_enc, stored_path FROM profiler_attachments WHERE entry_id=? ORDER BY id ASC", |
| 16475 | (eid,), |
| 16476 | ).fetchall() |
nothing calls this directly
no test coverage detected