chore: rebase onto upstream v1.6.1 + bump to v1.6.1-aio.1
Some checks failed
lint.yml / chore: rebase onto upstream v1.6.1 + bump to v1.6.1-aio.1 (push) Failing after 0s
Some checks failed
lint.yml / chore: rebase onto upstream v1.6.1 + bump to v1.6.1-aio.1 (push) Failing after 0s
Rebases the aio fork onto upstream v1.6.1 (4bf867e), pulling in:
- fiat checkout + email/Nostr DM ticket notifications (PR #50)
- currency-conversion fix (v1.5.0)
- custom notification subject/body (v1.6.0)
- resend-email button on the ticket list (PR #51)
Notable merges:
- views_api.api_event_update keeps the explicit-field-list gating from
the aio.4 security fix, with allow_fiat + fiat_currency added so an
owner editing a fiat-enabled event keeps the fiat config.
- models.PublicEvent now exposes both upstream's fiat fields and our
location / categories / status fields.
- migrations.py reverts to byte-identical to upstream v1.6.1 (no aio
entries); fork schema lives in migrations_fork.py (per aiolabs/lnbits#8).
- Lint reformatted with black + ruff to match upstream style.
Contributors entry adds `padreug` (aio fork maintainer).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b576a490d2
commit
27cc8d2f1c
7 changed files with 22 additions and 34 deletions
14
views_api.py
14
views_api.py
|
|
@ -161,9 +161,7 @@ async def api_get_event(event_id: str) -> Event:
|
|||
|
||||
# closing_date is filled in by create_event (defaults to end_date or
|
||||
# start_date) but the field is typed Optional, so guard for the typechecker.
|
||||
closing_date = (
|
||||
event.closing_date or event.event_end_date or event.event_start_date
|
||||
)
|
||||
closing_date = event.closing_date or event.event_end_date or event.event_start_date
|
||||
# Accept either YYYY-MM-DD or full ISO 8601 datetime (event_end_date
|
||||
# may carry a time component since v1.3.0-aio.3 / our start-end-time
|
||||
# feature).
|
||||
|
|
@ -210,10 +208,7 @@ async def api_event_create(
|
|||
|
||||
ext_settings = await get_settings()
|
||||
user_id = wallet.wallet.user
|
||||
is_admin = (
|
||||
user_id == settings.super_user
|
||||
or user_id in settings.lnbits_admin_users
|
||||
)
|
||||
is_admin = user_id == settings.super_user or user_id in settings.lnbits_admin_users
|
||||
if not is_admin and not ext_settings.auto_approve:
|
||||
data.status = "proposed"
|
||||
|
||||
|
|
@ -249,9 +244,7 @@ async def api_event_update(
|
|||
status_code=HTTPStatus.NOT_FOUND, detail="Event does not exist."
|
||||
)
|
||||
if event.wallet != wallet.wallet.id:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.FORBIDDEN, detail="Not your event."
|
||||
)
|
||||
raise HTTPException(status_code=HTTPStatus.FORBIDDEN, detail="Not your event.")
|
||||
|
||||
from lnbits.settings import settings
|
||||
|
||||
|
|
@ -292,7 +285,6 @@ async def api_event_update(
|
|||
|
||||
event.status = "approved" if (is_admin or ext_settings.auto_approve) else "proposed"
|
||||
|
||||
|
||||
event = await update_event(event)
|
||||
|
||||
if event.status == "approved":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue