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
class Tag(Document):
name = StringField(verbose_name=_(u'name'), unique=True)
slug = StringField(verbose_name=_(u'slug'))
language = StringField(verbose_name=_(u'language'), default='')
parents = ListField(ReferenceField('self'), default=list)
children = ListField(ReferenceField('self'), default=list)
origin = GenericReferenceField(verbose_name=_(u'Origin'),
help_text=_(u'Initial origin from where '
u'the tag was created from, to eventually '
u'help defining other attributes.'))
duplicate_of = ReferenceField('Tag', verbose_name=_(u'Duplicate of'),
help_text=_(u'Put a "master" tag here to '
u'help avoiding too much different tags '
u'(eg. singular and plurals) with the same '
u'meaning and loss of information.'))
meta = {
'indexes': ['name', ]
}
Stacktrace of the crash. If I change the referencefield of the duplicate_of attribute to 'self' instead of 'Tag', I get another stacktrace crash, but I think it's basically the same problem.
It doesn't occur if I use ListField(ReferenceField(… [same content]…)), but obviously I do not want to use a list.
Any hint on this one ?
regards,
The text was updated successfully, but these errors were encountered:
You can either use the newest github version of mongodbforms or fix it yourself by changing the last if statement in _setup_document_fields in documentoptions.py to:
Hi,
We encounter a crash with the following code:
in
models
:in
admin.py
:Stacktrace of the crash. If I change the referencefield of the
duplicate_of
attribute to'self'
instead of'Tag'
, I get another stacktrace crash, but I think it's basically the same problem.It doesn't occur if I use
ListField(ReferenceField(… [same content]…))
, but obviously I do not want to use a list.Any hint on this one ?
regards,
The text was updated successfully, but these errors were encountered: