Skip to content
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

Date field #1825

Merged
merged 3 commits into from Jul 27, 2018
Merged

Date field #1825

merged 3 commits into from Jul 27, 2018

Conversation

@orsinium
Copy link
Contributor

@orsinium orsinium commented Jul 20, 2018

Close #513

@orsinium
Copy link
Contributor Author

@orsinium orsinium commented Jul 25, 2018

@erdenezul, can you review my PR?

@erdenezul
Copy link
Collaborator

@erdenezul erdenezul commented Jul 26, 2018

Sure

@erdenezul
Copy link
Collaborator

@erdenezul erdenezul commented Jul 27, 2018

@orsinium can you add changelog about it. otherwise it looks good to me.

@orsinium
Copy link
Contributor Author

@orsinium orsinium commented Jul 27, 2018

Thank you. Added changelog. Can you merge PR now?

@erdenezul erdenezul merged commit 02a557a into MongoEngine:master Jul 27, 2018
2 checks passed
2 checks passed
code-quality/landscape Landscape has completed the code quality check
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@th3happybit
Copy link

@th3happybit th3happybit commented Jun 19, 2020

Datefield does not support null value, @orsinium can you fix it, please 🙏

@bagerard
Copy link
Collaborator

@bagerard bagerard commented Jun 20, 2020

@th3happybit It seems ok, see below

class JediX(Document):
    dob = DateField()

jedix = JediX(dob=datetime.now()).save()
print(jedix.dob)    # datetime.date(2020, 6, 20)

jedix.dob = None
jedix.save()

jedix = JediX.objects.first()    # fetch the object again
print(jedix.dob is None)	# True

Please open an issue with a reproducible code that demonstrates your problem instead of posting this in an old PR

@orsinium orsinium deleted the orsinium-forks:date-field branch Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants