Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

ReferenceField(required=False) doesn't allow to be None #57

Closed
gaussgss opened this Issue · 2 comments

2 participants

@gaussgss

test piece:

class Doc1(Document):
  title = StringField()

class Doc2(Document):
  ref = ReferenceField(Doc1, required = False)

>>> a = Doc1(title = 'abl')
>>> a.save()
>>> b = Doc2(ref = a)
>>> b.save()
>>> b.ref = None
>>> b.save()
ValidationError....
@flosch

Seems to be already fixed, your example works. Please close this issue.

@gaussgss

Yes, it works now, thanks.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.