-
Notifications
You must be signed in to change notification settings - Fork 25
INTPYTHON-658 Add PolymorphicEmbeddedModelArrayField #335
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
Conversation
729fd87
to
d348536
Compare
django_mongodb_backend/fields/polymorphic_embedded_model_array.py
Outdated
Show resolved
Hide resolved
d348536
to
e9ae1a5
Compare
if not cls._meta.abstract: | ||
# If embedded_models contains any strings, replace them with the actual | ||
# model classes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How could this class ever come back as an abstract one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the field is declared on an abstract model.
(The condition is copied from django.db.models.fields.related.RelatedField.contribute_to_class()
.)
@@ -89,7 +89,7 @@ def convert_value(value, expression, connection): | |||
def get_db_converters(self, expression): | |||
converters = super().get_db_converters(expression) | |||
internal_type = expression.output_field.get_internal_type() | |||
if internal_type == "ArrayField": | |||
if internal_type.endswith("ArrayField"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
e9ae1a5
to
6d1f396
Compare
No description provided.