Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
playwright:
name: "Playwright Tests"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like Playwright isn't running out of the box on Ubuntu 24.04 at the moment due to some missing dependencies.

microsoft/playwright#30368

steps:
- name: "Checkout repository"
uses: "actions/checkout@v4"
Expand Down
5 changes: 3 additions & 2 deletions admin_ui/src/components/NewForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
v-bind:timeResolution="
schema?.extra?.time_resolution[columnName]
"
v-bind:format="property.format"
v-bind:format="getFormat(property)"
/>
</div>
</div>
Expand All @@ -23,7 +23,7 @@
<script lang="ts">
import { defineComponent, type PropType } from "vue"
import InputField from "./InputField.vue"
import { type Schema, getType } from "@/interfaces"
import { type Schema, getType, getFormat } from "@/interfaces"

export default defineComponent({
props: {
Expand All @@ -37,6 +37,7 @@ export default defineComponent({
},
setup() {
return {
getFormat,
getType
}
}
Expand Down
8 changes: 4 additions & 4 deletions piccolo_admin/endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,13 @@ class GroupItem(BaseModel):


class GroupedTableNamesResponseModel(BaseModel):
grouped: t.Dict[str, t.List[str]] = Field(default_factory=list)
grouped: t.Dict[str, t.List[str]] = Field(default_factory=dict)
ungrouped: t.List[str] = Field(default_factory=list)


class GroupedFormsResponseModel(BaseModel):
grouped: t.Dict[str, t.List[FormConfigResponseModel]] = Field(
default_factory=list
default_factory=dict
)
ungrouped: t.List[FormConfigResponseModel] = Field(default_factory=list)

Expand Down Expand Up @@ -680,7 +680,7 @@ def __init__(

private_app.add_route(
path="/change-password/",
route=change_password(
route=change_password( # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure the Starlette type annotations are wrong here - we're just passing in a HTTPEndpoint.

login_url="./../../public/login/",
session_table=session_table,
read_only=read_only,
Expand Down Expand Up @@ -786,7 +786,7 @@ def __init__(

public_app.add_route(
path="/logout/",
route=session_logout(session_table=session_table),
route=session_logout(session_table=session_table), # type: ignore
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above about type annotations.

methods=["POST"],
)

Expand Down
8 changes: 2 additions & 6 deletions requirements/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ flake8==7.0.0
piccolo[postgres,sqlite]>=1.16.0
playwright==1.41.2
pytest-playwright==0.4.4
httpx>=0.20.0
# This is needed because newer versions of FastAPI use a Starlette version with
# a `TestClient` which breaks rate limiting.
# The changes to `TestClient` will likely be reverted in a future release, in
# which case we can remove this version pin.
fastapi==0.106.0
httpx==0.28.1
fastapi==0.115.6
Loading