Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Add bool as a mongo-safe type.
Browse files Browse the repository at this point in the history
Note that bool is a subclass of int, so isinstance() made it work. Wow,
my confidence in isinstance(is really shook right now.
  • Loading branch information
strichter committed Jan 13, 2014
1 parent 68f0939 commit f2c0e89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mongopersist/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from bson import objectid, dbref

MONGO_NATIVE_TYPES = (
int, float, unicode, datetime.datetime, types.NoneType,
bool, int, float, unicode, datetime.datetime, types.NoneType,
objectid.ObjectId, dbref.DBRef)
REFERENCE_SAFE_TYPES = (
datetime.date, datetime.time, decimal.Decimal)
Expand Down

0 comments on commit f2c0e89

Please sign in to comment.