Skip to content

EmbeddedField - TypeError: Abstract models cannot be instantiated. #606

Description

@dusan91judo

Hi, there is still an issue for Embedded fields. Is there any way that this is going to be fixed ?

My requirements.txt

Django==4.0.1
djangorestframework==3.12.2
djongo==1.3.6
pymongo==3.12.1
pytz==2021.3

class CommercialProjectDocument(models.Model):
    tax = models.ArrayField(model_container=Tax, null=True, help_text='taxes')

    class Meta:
        abstract = True


class Project(models.Model):
     _id = models.ObjectIdField(help_text='Unique identifier')
     document = models.EmbeddedField(model_container=CommercialProjectDocument, null=True, default=None)

When I'm trying to query and serialize project I'm getting issue about abstract = True property.
Does this library is no longer maintained, since this is well known issue for long time ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions