This repository has been archived by the owner on Mar 28, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The resource should remove the last_modified field if it shouldn't go trough, whereas the storage should create a new timestamp if none is present, and keep it otherwise.
So it's bumped automatically.
First of all I would like to say thank you for tackling this bug so fast 👍 I was kind of afraid it would block us on the long run. |
Still misses (on the way) tests for creation and the migrations for the SQL schema. |
@@ -12,6 +12,13 @@ END; | |||
$$ LANGUAGE plpgsql | |||
IMMUTABLE; | |||
|
|||
CREATE OR REPLACE FUNCTION from_epoch(epoch BIGINT) RETURNS TIMESTAMP AS $$ | |||
BEGIN | |||
RETURN TIMESTAMP WITH TIME ZONE 'epoch' + epoch * INTERVAL '1 millisecond'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this handle epoch being null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently it does 👍
Just updated with the two missing bits. |
# Need to delete the last_modified field of the record for it to not | ||
# be kept (in no case we want to keep the old one). | ||
del existing[modified_field] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Need to remove whitespaces. for flake8
2 tasks
10ms wasn't enough as a diff, increased to 100.
Youpi !!!! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow to keep the
last_modified
header when specified in the data. Fixes #587.