Skip to content

Commit 8b399c0

Browse files
committed
Post with data doesn't work for large records, also not necessary
1 parent 4b612e7 commit 8b399c0

1 file changed

Lines changed: 0 additions & 7 deletions

File tree

caltechdata_api/caltechdata_edit.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -326,17 +326,10 @@ def caltechdata_edit(
326326
# We make a draft
327327
result = requests.post(
328328
url + "/api/records/" + idv + "/draft",
329-
json=data,
330329
headers=headers,
331330
)
332331
if result.status_code != 201:
333332
raise Exception(result.text)
334-
result = requests.get(
335-
url + "/api/records/" + idv,
336-
headers=headers,
337-
)
338-
if result.status_code != 200:
339-
raise Exception(result.text)
340333
# We want files to stay the same as the existing record
341334
data["files"] = existing["files"]
342335
if default_preview:

0 commit comments

Comments
 (0)