-
Notifications
You must be signed in to change notification settings - Fork 4
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(mongo): let replace create new documents #15
Merged
Merged
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
so that we can do upsert
@superdesk/developers |
👍 |
@@ -428,7 +428,7 @@ def replace(self, resource, id_, document): | |||
# have changed since the ETag was computed. This would require getting | |||
# the original document as an argument though. | |||
try: | |||
self.driver.db[datasource].update(filter_, document, | |||
self.driver.db[datasource].update(filter_, document, upsert=True, |
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.
Won't this actually hide a race condition?
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.
if you put the document doesn't have to be there imo, does it?
amagdas
added a commit
that referenced
this pull request
Nov 19, 2014
fix(mongo): let replace create new documents
amagdas
added a commit
to amagdas/eve
that referenced
this pull request
Dec 9, 2014
fix(mongo): let replace create new documents
amagdas
added a commit
to amagdas/eve
that referenced
this pull request
Jan 13, 2015
commit 646ad57 Author: Kuna Siva <[email protected]> Date: Tue Dec 9 12:12:41 2014 +1100 Versioning Ignores source of datasource Versioning always treats resource name as the datasource but for some resources the actual datasource is defined in resource_def['datasource']['source'] commit 811b2be Author: Mayur Dhamanwala <[email protected]> Date: Fri Dec 5 15:17:04 2014 +1100 fixing the bug where objectid is None then it does not serialize it. commit 4bff372 Merge: 1ddaa00 7798860 Author: Magdas Adrian <[email protected]> Date: Wed Nov 19 10:37:19 2014 +0200 Merge pull request superdesk#15 from petrjasek/develop fix(mongo): let replace create new documents commit 7798860 Author: petr.jasek <[email protected]> Date: Fri Nov 14 14:01:27 2014 +1100 fix(mongo): let replace create new documents so that we can do upsert commit 1ddaa00 Merge: 2db0a04 dfd54d4 Author: petr.jasek <[email protected]> Date: Thu Sep 25 19:31:39 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 2db0a04 Merge: 5fcdc6d 732081a Author: Magdas Adrian <[email protected]> Date: Tue Sep 2 10:02:17 2014 +0200 Merge pull request superdesk#14 from amagdas/disable-cache Disable cache commit 5fcdc6d Merge: 5338208 40093f8 Author: Magdas Adrian <[email protected]> Date: Fri Aug 29 14:08:35 2014 +0300 Merge pull request superdesk#13 from superdesk/fix-weak-date use rfc1123 date format for weak_date commit 5338208 Merge: 852a436 2a10775 Author: Magdas Adrian <[email protected]> Date: Thu Aug 28 11:33:20 2014 +0300 Merge pull request superdesk#12 from amagdas/sync-upstream Sync upstream commit 2a10775 Merge: 242439e 89ae133 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request superdesk#11 from ioanpocol/develop Add support for custom HATEOAS commit 89ae133 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc. commit 852a436 Merge: 2b0d11e 26679c6 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request superdesk#11 from ioanpocol/develop Add support for custom HATEOAS commit 26679c6 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc.
amagdas
added a commit
that referenced
this pull request
Feb 24, 2015
commit 646ad57 Author: Kuna Siva <[email protected]> Date: Tue Dec 9 12:12:41 2014 +1100 Versioning Ignores source of datasource Versioning always treats resource name as the datasource but for some resources the actual datasource is defined in resource_def['datasource']['source'] commit 811b2be Author: Mayur Dhamanwala <[email protected]> Date: Fri Dec 5 15:17:04 2014 +1100 fixing the bug where objectid is None then it does not serialize it. commit 4bff372 Merge: 1ddaa00 7798860 Author: Magdas Adrian <[email protected]> Date: Wed Nov 19 10:37:19 2014 +0200 Merge pull request #15 from petrjasek/develop fix(mongo): let replace create new documents commit 7798860 Author: petr.jasek <[email protected]> Date: Fri Nov 14 14:01:27 2014 +1100 fix(mongo): let replace create new documents so that we can do upsert commit 1ddaa00 Merge: 2db0a04 dfd54d4 Author: petr.jasek <[email protected]> Date: Thu Sep 25 19:31:39 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 2db0a04 Merge: 5fcdc6d 732081a Author: Magdas Adrian <[email protected]> Date: Tue Sep 2 10:02:17 2014 +0200 Merge pull request #14 from amagdas/disable-cache Disable cache commit 5fcdc6d Merge: 5338208 40093f8 Author: Magdas Adrian <[email protected]> Date: Fri Aug 29 14:08:35 2014 +0300 Merge pull request #13 from superdesk/fix-weak-date use rfc1123 date format for weak_date commit 5338208 Merge: 852a436 2a10775 Author: Magdas Adrian <[email protected]> Date: Thu Aug 28 11:33:20 2014 +0300 Merge pull request #12 from amagdas/sync-upstream Sync upstream commit 2a10775 Merge: 242439e 89ae133 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request #11 from ioanpocol/develop Add support for custom HATEOAS commit 89ae133 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc. commit 852a436 Merge: 2b0d11e 26679c6 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request #11 from ioanpocol/develop Add support for custom HATEOAS commit 26679c6 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc.
amagdas
added a commit
that referenced
this pull request
Mar 1, 2015
commit 646ad57 Author: Kuna Siva <[email protected]> Date: Tue Dec 9 12:12:41 2014 +1100 Versioning Ignores source of datasource Versioning always treats resource name as the datasource but for some resources the actual datasource is defined in resource_def['datasource']['source'] commit 811b2be Author: Mayur Dhamanwala <[email protected]> Date: Fri Dec 5 15:17:04 2014 +1100 fixing the bug where objectid is None then it does not serialize it. commit 4bff372 Merge: 1ddaa00 7798860 Author: Magdas Adrian <[email protected]> Date: Wed Nov 19 10:37:19 2014 +0200 Merge pull request #15 from petrjasek/develop fix(mongo): let replace create new documents commit 7798860 Author: petr.jasek <[email protected]> Date: Fri Nov 14 14:01:27 2014 +1100 fix(mongo): let replace create new documents so that we can do upsert commit 1ddaa00 Merge: 2db0a04 dfd54d4 Author: petr.jasek <[email protected]> Date: Thu Sep 25 19:31:39 2014 +0200 Merge remote-tracking branch 'upstream/develop' into develop commit 2db0a04 Merge: 5fcdc6d 732081a Author: Magdas Adrian <[email protected]> Date: Tue Sep 2 10:02:17 2014 +0200 Merge pull request #14 from amagdas/disable-cache Disable cache commit 5fcdc6d Merge: 5338208 40093f8 Author: Magdas Adrian <[email protected]> Date: Fri Aug 29 14:08:35 2014 +0300 Merge pull request #13 from superdesk/fix-weak-date use rfc1123 date format for weak_date commit 5338208 Merge: 852a436 2a10775 Author: Magdas Adrian <[email protected]> Date: Thu Aug 28 11:33:20 2014 +0300 Merge pull request #12 from amagdas/sync-upstream Sync upstream commit 2a10775 Merge: 242439e 89ae133 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request #11 from ioanpocol/develop Add support for custom HATEOAS commit 89ae133 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc. commit 852a436 Merge: 2b0d11e 26679c6 Author: Petr Jašek <[email protected]> Date: Fri Aug 22 09:23:06 2014 +0200 Merge pull request #11 from ioanpocol/develop Add support for custom HATEOAS commit 26679c6 Author: ioanpocol <[email protected]> Date: Fri Aug 22 10:19:33 2014 +0300 Add support for custom HATEOAS Updated the code in order to don't overwrite '_self' and 'self' if already exists in doc.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
so that we can do upsert