You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classTagInstance(EmbeddedDocument):
""" This class represent an instance of the Tag used for defining product's rep's tags or conditions on questions values_ord is used to store values when an order is defined on values """# should be the same name of the tagname=StringField(required=False, max_length=200, null=True)
# the comparator used for this tag instancecomparator=StringField(required=False, max_length=200, null=True)
# values of the tag inst could be one (=,<,>) or multiple values (Between, IN)# only one of this below fields should be used for a Tagvalues=ListField(StringField(required=False, max_length=200))
values_ord=ListField(ListField(StringField(required=False, max_length=200), null=True))
classProduct(DynamicDocument):
""" a class that represent a product """# Meta variables.meta= {'collection': 'products'}
ean=StringField(required=False, max_length=200, null=True)
name=StringField(required=False, max_length=200, null=True)
family=StringField(required=False, max_length=200, null=True)
brand=StringField(required=False, max_length=200, null=True)
assortment=StringField(required=False, max_length=200, null=True)
area=StringField(required=False, max_length=200, null=True)
tags=ListField(EmbeddedDocumentField(TagInstance))
code snippet to load data to mongo passing by mongoengine:
Hi everyone,
I'm trying to create a code snippet to load some fixtures in mongomock via mongoengine.
products.json file:
Product Document and tag document:
code snippet to load data to mongo passing by mongoengine:
The error:
The text was updated successfully, but these errors were encountered: