Skip to content

Commit 334010b

Browse files
authored
fix draft blog creation
1 parent 01d17d2 commit 334010b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

blog/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ def upload_blog(blog: StrapiBlog):
160160
.replace("+00:00", "Z")
161161
)
162162
create_response = session.post(
163-
base_url, headers=headers, data=json.dumps(blog.get_post_json())
163+
f"{base_url}?status=draft",
164+
headers=headers,
165+
data=json.dumps(blog.get_post_json()),
164166
)
165167

166168
if create_response.status_code not in (200, 201):

0 commit comments

Comments
 (0)