Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Choices with strings on a IntegerField #5

Open
avoine opened this issue Jun 12, 2011 · 0 comments
Open

Choices with strings on a IntegerField #5

avoine opened this issue Jun 12, 2011 · 0 comments

Comments

@avoine
Copy link

avoine commented Jun 12, 2011

The validation of the status is not working because the choices are strings

diff --git a/blproject/models.py b/blproject/models.py
index f7a6fb1..bce8304 100644
--- a/blproject/models.py
+++ b/blproject/models.py
@@ -17,7 +17,7 @@ from tagging.fields import TagField
 
 import os, datetime
 
-CHOICES = (('1', _(u'On Hold')), ('2', _(u'In Progress')), ('3', _(u'Finished')))
+CHOICES = ((1, _(u'On Hold')), (2, _(u'In Progress')), (3, _(u'Finished')))
     
 def project_dir(instance, filename):
     ext = filename.split('.')[-1]

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

1 participant