myuser.user_permissions.add("whoops, a string here?!?")

60 views
Skip to first unread message

jedie

unread,
Jun 19, 2009, 3:23:48 AM6/19/09
to Django developers
Hi...

If i made this:

myuser.user_permissions.add("whoops, a string here?!?")

I get no Traceback, why?

Is this a Bug or something for:
http://code.djangoproject.com/wiki/BetterErrorMessages

Mfg.

Jens

Karen Tracey

unread,
Jun 19, 2009, 9:14:51 AM6/19/09
to django-d...@googlegroups.com
On Fri, Jun 19, 2009 at 3:23 AM, jedie <google...@jensdiemer.de> wrote:

Hi...

If i made this:

   myuser.user_permissions.add("whoops, a string here?!?")

I get no Traceback, why?

I'm guessing you are trying that with sqlite.  I get tracebacks on MySQL/InnoDB (foreign key constraint fails) and MySQL/MyISAM (truncated incorrect double value).  Apparently sqlite doesn't object if the provided data doesn't match the table schema.
 

Is this a Bug or something for:
   http://code.djangoproject.com/wiki/BetterErrorMessages

Not sure it is either.  Looks like Django is relying on the DB to flag an error, which seems a reasonable approach.  If the DB doesn't flag it...you can always switch to one that is more rigorous in terms of error-checking.

Karen
Reply all
Reply to author
Forward
0 new messages