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

Close #513

@orsinium
Copy link
Contributor Author

@erdenezul, can you review my PR?

@erdenezul
Copy link
Collaborator

Sure

@erdenezul
Copy link
Collaborator

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

@orsinium
Copy link
Contributor Author

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

@erdenezul erdenezul merged commit 02a557a into MongoEngine:master Jul 27, 2018
@th3happybit
Copy link

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

@bagerard
Copy link
Collaborator

@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 date-field branch July 1, 2020 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DateField
4 participants