You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the constants file, there is an empty constant that lumps None and other empty values together. Several places use this constant to ignore values when they are None/Empty (e.g. here).
The problem is that when you call /users?id__in= for example, you'd think that no users would be returned. The query is effectively asking for users whose ids are in [] (which is no users). I'd argue that asking for users with id__in=[] is very different than id__in=None since the latter means that no filter was supplied/no filtering is desired. To give an example using django:
In [3]: User.objects.all()
Out[3]: <QuerySet [<User: admin>]>
In [4]: User.objects.filter(pk__in=[])
Out[4]: <QuerySet []>
The text was updated successfully, but these errors were encountered:
In the constants file, there is an empty constant that lumps None and other empty values together. Several places use this constant to ignore values when they are None/Empty (e.g. here).
The problem is that when you call
/users?id__in=
for example, you'd think that no users would be returned. The query is effectively asking for users whose ids are in[]
(which is no users). I'd argue that asking for users withid__in=[]
is very different thanid__in=None
since the latter means that no filter was supplied/no filtering is desired. To give an example using django:The text was updated successfully, but these errors were encountered: