Closed simonw closed 1 year ago
Spotted on Discord: it turns out databases are immutable by default! https://discord.com/channels/823971286308356157/996877076982415491/1017673690638454794
https://github.com/simonw/datasette-upload-dbs/blob/81510ef4f0004371a3adda18100936b430535cc1/datasette_upload_dbs/__init__.py#L50 The plugin adds all databases as immutable Including the newly uploaded one https://github.com/simonw/datasette-upload-dbs/blob/81510ef4f0004371a3adda18100936b430535cc1/datasette_upload_dbs/__init__.py#L124 Databases are immutable by default https://github.com/simonw/datasette/blob/bf8d84af5422606597be893cedd375020cb2b369/datasette/database.py#L31 So that would trigger the 403 if you'd try to upload & insert a csv into one of those databases.
https://github.com/simonw/datasette-upload-dbs/blob/81510ef4f0004371a3adda18100936b430535cc1/datasette_upload_dbs/__init__.py#L50
The plugin adds all databases as immutable
Including the newly uploaded one https://github.com/simonw/datasette-upload-dbs/blob/81510ef4f0004371a3adda18100936b430535cc1/datasette_upload_dbs/__init__.py#L124
Databases are immutable by default https://github.com/simonw/datasette/blob/bf8d84af5422606597be893cedd375020cb2b369/datasette/database.py#L31
So that would trigger the 403 if you'd try to upload & insert a csv into one of those databases.
I think this is an API design flaw in Datasette itself, but I can fix it here first.
Spotted on Discord: it turns out databases are immutable by default! https://discord.com/channels/823971286308356157/996877076982415491/1017673690638454794