From 9879a15b15a902ccf6ab4d1c94b15c21e8b3bbc6 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 9 Nov 2026 12:50:39 +0800 Subject: [PATCH 1/2] fix: omit empty owner on JSON import to avoid Subscription validation errors Fixes #22 Halo draftPost() only fills the current user when owner is null/absent. Setting owner to '' left posts with an empty owner, so PostReconciler failed Subscription validation and imported drafts stayed invisible. --- ui/src/views/tabs/JsonImport.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/tabs/JsonImport.vue b/ui/src/views/tabs/JsonImport.vue index 0765bd2..d3635b8 100644 --- a/ui/src/views/tabs/JsonImport.vue +++ b/ui/src/views/tabs/JsonImport.vue @@ -355,7 +355,7 @@ function preparePostRequestForImport(postRequest: PostRequest): PostRequest { postRequest.post.spec.publish = false; postRequest.post.spec.publishTime = undefined; - postRequest.post.spec.owner = ''; + // Omit owner so Halo draftPost() fills the current user (empty string breaks Subscription). postRequest.post.spec.pinned = false; postRequest.post.spec.template = ''; From 089e750af4b1b95db5017cb76a929e6360ef5da0 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Mon, 9 Nov 2026 12:51:10 +0800 Subject: [PATCH 2/2] fix: delete owner on JSON import instead of setting empty string Empty string was kept by Halo draftPost() and broke Subscription validation. delete leaves owner absent so the current user is filled. Fixes #22. --- ui/src/views/tabs/JsonImport.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/views/tabs/JsonImport.vue b/ui/src/views/tabs/JsonImport.vue index d3635b8..c65e1d3 100644 --- a/ui/src/views/tabs/JsonImport.vue +++ b/ui/src/views/tabs/JsonImport.vue @@ -355,7 +355,8 @@ function preparePostRequestForImport(postRequest: PostRequest): PostRequest { postRequest.post.spec.publish = false; postRequest.post.spec.publishTime = undefined; - // Omit owner so Halo draftPost() fills the current user (empty string breaks Subscription). + // Clear owner (do not set '') so Halo draftPost() fills the current user. + delete postRequest.post.spec.owner; postRequest.post.spec.pinned = false; postRequest.post.spec.template = '';