Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle actors with no ID key #21

Closed
simonw opened this issue Sep 1, 2024 · 1 comment
Closed

Handle actors with no ID key #21

simonw opened this issue Sep 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@simonw
Copy link
Contributor

simonw commented Sep 1, 2024

This came up running tests on another project with this as a dependency:

  File ".../site-packages/datasette_acl/__init__.py", line 198, in update_dynamic_groups
    if (not skip_cache) and one_second_cache.get(actor["id"]):
                                                 ~~~~~^^^^^^
@simonw simonw added the bug Something isn't working label Sep 1, 2024
@simonw
Copy link
Contributor Author

simonw commented Sep 1, 2024

Actually this happened for an actor that looked like this:

(Pdb) actor
{'_datasette_enrichments': True}

That's a trick that https://github.com/datasette/datasette-enrichments uses.

@simonw simonw changed the title KeyError: 'id' crash Handle actors with no ID key Sep 1, 2024
@simonw simonw closed this as completed in 4bc4787 Sep 1, 2024
simonw added a commit that referenced this issue Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant