Skip to content
This repository was archived by the owner on Jul 17, 2018. It is now read-only.

Problem if my id key is not integer #14

Open
ghost opened this issue Nov 28, 2010 · 2 comments
Open

Problem if my id key is not integer #14

ghost opened this issue Nov 28, 2010 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 28, 2010

My models all extend my custom model class which id is a CharField not a PositiveIntegerField like the Django's default django.db.models.Model . So, when I try to add a vote, the code will fail at:

rating, created = Vote.objects.get(**kwargs), False

in fields.py because of the object_id field being defined like this in models.py:

object_id       = models.PositiveIntegerField()

Any ideas how should I deal with this ?

Thanks in advance

@dengyuanzhong
Copy link

I have the same problem!

@gakhov
Copy link

gakhov commented Sep 18, 2011

I have the same problem, since my PrimaryKey is a SlugField.

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

No branches or pull requests

2 participants