fix: use correct Grist API endpoint for modify_column
The Grist API uses PATCH /tables/{table}/columns with a columns array
in the body, not PATCH /tables/{table}/columns/{column_id}. Updated
the endpoint to match the API spec.
This commit is contained in:
@@ -160,7 +160,8 @@ class GristClient:
|
||||
if formula is not None:
|
||||
fields["formula"] = formula
|
||||
|
||||
await self._request("PATCH", f"/tables/{table}/columns/{column_id}", json={"fields": fields})
|
||||
payload = {"columns": [{"id": column_id, "fields": fields}]}
|
||||
await self._request("PATCH", f"/tables/{table}/columns", json=payload)
|
||||
|
||||
async def delete_column(self, table: str, column_id: str) -> None:
|
||||
"""Delete a column from a table."""
|
||||
|
||||
Reference in New Issue
Block a user