From 0090ece6110acab7e3026765f81282ef7cf48092 Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Sat, 27 Jan 2024 10:37:48 +0100 Subject: [PATCH 1/2] Add event place filter for API #563 --- .vscode/settings.json | 2 +- project/api/event/schemas.py | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index eda19f6..a1ff006 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,7 +6,7 @@ "python.testing.pytestEnabled": true, "[python]": { "editor.codeActionsOnSave": { - "source.organizeImports": true + "source.organizeImports": "explicit" } }, "[html]": { diff --git a/project/api/event/schemas.py b/project/api/event/schemas.py index 8f5ea82..7323f9b 100644 --- a/project/api/event/schemas.py +++ b/project/api/event/schemas.py @@ -320,6 +320,19 @@ class EventSearchRequestSchema(PaginationRequestSchema, TrackableRequestSchemaMi "description": "Looks for events at this weekdays (0=Sunday, 1=Monday, ..)." }, ) + organization_id = fields.Int( + metadata={"description": "Looks for events with this organization id."}, + ) + organizer_id = fields.Int( + metadata={"description": "Looks for events with this organizer id."}, + ) + event_place_id = fields.Int( + metadata={"description": "Looks for events with this event place id."}, + ) + event_list_id = fields.List( + fields.Int(), + metadata={"description": "Looks for events with this event list ids."}, + ) sort = fields.Str( metadata={"description": "Sort result items."}, validate=validate.OneOf( @@ -337,6 +350,10 @@ class EventSearchRequestSchema(PaginationRequestSchema, TrackableRequestSchemaMi EnumField(EventStatus), metadata={"description": "Looks for events with this stati."}, ) + public_status = fields.List( + EnumField(PublicStatus), + metadata={"description": "Looks for events with this public stati."}, + ) postal_code = fields.List( fields.Str(), metadata={"description": "Looks for events with places with this postal code."}, From f19ca062af74fa3802f9db44bb4dcab733c2f8ba Mon Sep 17 00:00:00 2001 From: Daniel Grams Date: Sat, 27 Jan 2024 10:43:03 +0100 Subject: [PATCH 2/2] Add event place filter for API #563 --- .github/workflows/lint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 44d6745..6b0be35 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,5 +9,5 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-python@v4 - uses: jamescurtin/isort-action@master - - uses: psf/black@stable - - uses: TrueBrain/actions-flake8@v1.4.1 \ No newline at end of file + - uses: psf/black@23.3.0 + - uses: TrueBrain/actions-flake8@v1.4.1