fix: use null instead of empty string for flag filter initial value

Axios sends empty string as query param which fails django-ninja
Literal validation. Null is omitted from params entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
xuyueandClaude Opus 4.6 committed 2026-03-09 18:15:35 +08:00
1 parent 0ee8b0d6ea
commit 016e070fb9
1 file changed
+3 -2
+3 -2
View File
@@ -151,7 +151,7 @@ const count = ref(0)
const query = reactive({
page: Number(route.params.page),
username: route.query.username ?? "",
flag: "" as string,
flag: null as string | null,
})
const html = computed(() => submission.value.html)
@@ -221,7 +221,7 @@ async function showChain(conversationId: string) {
const columns: DataTableColumn<SubmissionOut>[] = [
{
title: "标记",
title: "",
key: "flag",
width: 50,
render: (row) => {
@@ -274,6 +274,7 @@ const columns: DataTableColumn<SubmissionOut>[] = [
NButton,
{
text: true,
block: true,
type: "error",
onClick: () => updateFlag(row, null),
},