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

Save ManagedGroup before calling after_anvil_create #506

Merged

Conversation

amstilp
Copy link
Contributor

@amstilp amstilp commented Aug 7, 2024

No description provided.

This fixes a bug where the managed group was not saved when
after_anvil_create was called, which prevented the adapter method
from using the managed group in a foreign key relationship for
another model (e.g., creating a membership using that group). To fix
this, I had to convert the CreateView to a FormView to prevent the
history from having two records (a save plus an update/save). Add
a test to catch the bug.
@amstilp amstilp merged commit 5d48e68 into main Aug 7, 2024
11 checks passed
@amstilp amstilp deleted the bugfix/managed-group-after-anvil-create-save-object-first branch August 7, 2024 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant