Skip to content

Commit 1f6a038

Browse files
authored
feat: check for existing request_class config (#5)
* feat: check for existing request_class config * chore: bump version
1 parent 4f5fc87 commit 1f6a038

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
branches:
77
- main
88

9+
concurrency:
10+
group: test-${{ github.head_ref }}
11+
cancel-in-progress: true
12+
913
jobs:
1014
validate:
1115
runs-on: ubuntu-latest

litestar_htmx/plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ def on_app_init(self, app_config: AppConfig) -> AppConfig:
3939
Returns:
4040
The application configuration with the message callable registered.
4141
"""
42-
app_config.request_class = HTMXRequest
42+
if app_config.request_class is None:
43+
app_config.request_class = HTMXRequest
4344
app_config.signature_types = [
4445
HTMXRequest,
4546
ClientRedirect,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ maintainers = [
1313
name = "litestar-htmx"
1414
readme = "README.md"
1515
requires-python = ">=3.8, <4.0"
16-
version = "0.2.3"
16+
version = "0.2.4"
1717

1818
[build-system]
1919
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)