Friday, November 22, 2019

QuerySet.first() gives me unexpected result.

Django Users,

Can you tell me if this is bug in django or not:


The fact that `x.get()` doesn't throw exception tell me that QuerySet only have one element in it.
However, `x.first()` gives me different result on `price_per_kg` field. Instead of giving me the expected `12000`, it gives me `15000`.
--
Regards,

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN7EoAZH2%2B3OR8i_Ci3Pe3xXbhH5rTKTaVtt2hg9VZxD4QEhaA%40mail.gmail.com.

No comments:

Post a Comment