Skip to content

Conversation

trumpet2012
Copy link

When there was an abstract model in between a concrete subclass and it's PolymorphicModel class, the admin would not allow the child model to be moved because it was not in the allowed "childModels" being passed to the frontend.

For example the following would break:

graph TD;
  A[PolymorphicModel];
  A --> B[AbstractBase];
  B --> C[ChildOfAbstract];
  B --> D[ChildOfAbstract2];
  A --> E[DirectPolymorphicChild];
Loading

Before, the only valid child models passed to the frontend would be DirectPolymorphicChild and AbstractBase. This meant that ChildOfAbstract and ChildOfAbstract2 could be added to the admin, but were blocked from being moved around.

Added a test app to verify this change and show that now having an abstract class doesn't break the admin.

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