issue_comments: 1341825314
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/pull/1931#issuecomment-1341825314 | https://api.github.com/repos/simonw/datasette/issues/1931 | 1341825314 | IC_kwDOBm6k_c5P-qEi | 9599 | 2022-12-08T01:03:18Z | 2022-12-08T01:03:18Z | OWNER | I broke this test: ``` ds_write = <datasette.app.Datasette object at 0x7f0965858700> @pytest.mark.asyncio async def test_insert_row(ds_write): token = write_token(ds_write) response = await ds_write.client.post( "/data/docs/-/insert", json={"row": {"title": "Test", "score": 1.2, "age": 5}}, headers={ "Authorization": "***".format(token), "Content-Type": "application/json", }, ) expected_row = {"id": 1, "title": "Test", "score": 1.2, "age": 5} > assert response.status_code == 201 E assert 500 == 201 E + where 500 = <Response [500 Internal Server Error]>.status_code /home/runner/work/datasette/datasette/tests/test_api_write.py:43: AssertionError ----------------------------- Captured stderr call ----------------------------- Traceback (most recent call last): File "/home/runner/work/datasette/datasette/datasette/app.py", line 1447, in route_path response = await view(request, send) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 151, in view return await self.dispatch_request(request) File "/home/runner/work/datasette/datasette/datasette/views/base.py", line 105, in dispatch_request response = await handler(request) File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in post row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <listcomp> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] File "/home/runner/work/datasette/datasette/datasette/views/table.py", line 1228, in <genexpr> row_pk_values_for_later = [tuple(row[pk] for pk in pks) for row in rows] KeyError: 'id' ``` | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 1473814539 |