Skip to content

Conversation

sebasmagri
Copy link

This fixes syncdb when using mongodb-engine as the default SITE_ID=1 is
not a valid ObjectID in MongoDB. Setting a valid SITE_ID is already
suggested by mongodb-engine, but it does not have any effect if the
SITE_ID is hardcoded for the default site.

This fixes syncdb when using mongodb-engine as the default SITE_ID=1 is
not a valid ObjectID in MongoDB. Setting a valid SITE_ID is already
suggested by mongodb-engine, but it does not have any effect if the
SITE_ID is hardcoded for the default site.
@aburgel
Copy link
Member

aburgel commented Jul 20, 2014

We're trying to have as few differences as possible to our fork of django. This will make it easier to keep things in sync and eventually get rid of the fork altogether. Is there another way to handle this? Or if not, have you looked into contributing it to the upstream django project?

@wrwrwr
Copy link
Member

wrwrwr commented Dec 2, 2014

As of ticket #23945 this is in Django (master/1.8). I guess, we could backport it for nonrel.

PS: MongoDB itself seems to support non-ObjectID keys, so in theory the backend could allow them. For reference: the error message was introduced in django-nonrel/mongodb-engine@af136ba, but the ObjectId cast was there a lot earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants