Changes between Initial Version and Version 2 of Ticket #25980


Ignore:
Timestamp:
Dec 23, 2015, 12:30:48 PM (9 years ago)
Author:
karyon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #25980

    • Property Cc johannes.linke@… added
  • Ticket #25980 – Description

    initial v2  
    551. the error did not show up when the queryset i provided yielded no results, which is inconsistent. the reason for that is that [https://github.com/django/django/blob/d91cc25a2a43cb2526943dc2285ffe59e38fabfd/django/forms/models.py#L1250 this boolean expression] evaluates to true as soon as there are results in the queryset.
    66
     7edit: just found out this can only happen for disabled fields, because there the initial value is cleaned, and not some value taken from the widget, see [https://github.com/django/django/blob/d91cc25a2a43cb2526943dc2285ffe59e38fabfd/django/forms/forms.py#L372 here]
     8
    792. something else appeared fishy to me: in one line this method returns a queryset ({{{self.queryset.none()}}}), but in the next line it raises an error if the value is neither a list nor a tuple.
    810
Back to Top