Friday, September 19, 2014

Re: Possible Bug - PositiveSmallIntegerField Enables Saving Negative Values

I guess you're probably using SQLite as the database engine. "unsigned
integer" and "signed integer" belong to same affinity in SQLite
(http://www.sqlite.org/datatype3.html). Even if you specify "unsigned
int" for the column during creation, you can save negative values
without any error.
If you use MySQL or PostgrSQL, the exception will be raised.

On Sat, Sep 20, 2014 at 7:39 AM, Collin Anderson <cmawebsite@gmail.com> wrote:
> Yes. I believe that type of validation only happens in forms, or if you
> manually call obj.full_clean().
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/102e627a-b1b6-4d7b-98e1-2bdccbd59fd4%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN1WgRKRQwaWBDN7DGOajpjuZhYyryhH5SXz7UiS%3DNDgzOi9ZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment