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

fix(dgraph): Fix empty string response for zero datetime (#6067) #7236

Merged
merged 1 commit into from Jan 4, 2021

Conversation

vmrajas
Copy link
Contributor

@vmrajas vmrajas commented Dec 31, 2020

This PR fixes the empty string response for a zero-datetime value. The "0001-01-01T00:00:00Z" datetime is considered to be a zero value. Before we used to allow empty string for datetime mutation and internally stored empty string as zero datetime so we returned empty string for it but now empty string mutation is not allowed. So, we should return "0001-01-01T00:00:00Z" instead of empty string if the mutation contains "0001-01-01T00:00:00Z".

(cherry picked from commit 386665f)

Fixes DGRAPH-2859


This change is Reviewable

This PR fixes the empty string response for a zero-datetime value. The "0001-01-01T00:00:00Z" datetime is considered to be a zero value. Before we used to allow empty string for datetime mutation and internally stored empty string as zero datetime  so we returned empty string for it but now empty string mutation is not allowed. So, we should return "0001-01-01T00:00:00Z" instead of empty string if the mutation contains "0001-01-01T00:00:00Z".

(cherry picked from commit 386665f)
Copy link
Contributor

@danielmai danielmai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @darkn3rd, @manishrjain, @pawanrawal, and @vvbalaji-dgraph)

@vmrajas vmrajas merged commit 0875d25 into release/v20.07 Jan 4, 2021
@vmrajas vmrajas deleted the DGRAPH-2859 branch January 4, 2021 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants