diff options
author | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-25 20:52:25 +0100 |
---|---|---|
committer | Sebastian Spaeth <Sebastian@SSpaeth.de> | 2012-12-25 20:52:25 +0100 |
commit | 71717fd5316607500159f782b10ca91cf9684bfd (patch) | |
tree | 2a8503e3fae088564b0934abf10309cf108f3c22 /mediagoblin/db | |
parent | c338ed34fa30d84660bac4f275f73d8f2f6c902e (diff) | |
download | mediagoblin-71717fd5316607500159f782b10ca91cf9684bfd.tar.lz mediagoblin-71717fd5316607500159f782b10ca91cf9684bfd.tar.xz mediagoblin-71717fd5316607500159f782b10ca91cf9684bfd.zip |
Remove ObjectId from the tree
This was one of the last remaining Mongo holdouts and has been removed from
the tree herewith. Good bye, ObjectId.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Diffstat (limited to 'mediagoblin/db')
-rw-r--r-- | mediagoblin/db/sql/fake.py | 9 | ||||
-rw-r--r-- | mediagoblin/db/util.py | 2 |
2 files changed, 1 insertions, 10 deletions
diff --git a/mediagoblin/db/sql/fake.py b/mediagoblin/db/sql/fake.py index bb91dbcb..51c5127b 100644 --- a/mediagoblin/db/sql/fake.py +++ b/mediagoblin/db/sql/fake.py @@ -21,17 +21,8 @@ calm the rest of the code base. Or provide super minimal implementations. Currently: -- ObjectId "class": It's a function mostly doing - int(init_arg) to convert string primary keys into - integer primary keys. - DESCENDING "constant" """ DESCENDING = object() # a unique object for this "constant" - - -def ObjectId(value=None): - if value is None: - return None - return int(value) diff --git a/mediagoblin/db/util.py b/mediagoblin/db/util.py index f14f79aa..b7e93134 100644 --- a/mediagoblin/db/util.py +++ b/mediagoblin/db/util.py @@ -15,6 +15,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. #TODO: check now after mongo removal if we can't rip out a layer of abstraction -from mediagoblin.db.sql.fake import ObjectId, DESCENDING +from mediagoblin.db.sql.fake import DESCENDING from mediagoblin.db.sql.util import atomic_update, check_media_slug_used, \ media_entries_for_tag_slug, check_collection_slug_used |