prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Unable to filter customers with 0 orders
  ### **Steps to reproduce the problem:**
  ```graphql
  query Customers{
    customers(filter: {numberOfOrders: {lte: 0, gte: 0}},  first: 10){
      edges{
        node{
          id
          email
          orders{
            totalCount
          }
        }
      }
      totalCount
    }
  }
  ```
  
  ### **Current result:**
  Backend returns all customers instead of those with 0 orders
  
  ### **Expected result:**
  Return all customers with 0 orders
  
  ### **Screenshots:**
  
  ### **System information:**
  
  ### **Environment:**
  master.staging core v3.8.0-a
  
  ### **Additional info/links:**
  https://master.staging.saleor.cloud/dashboard/customers/?asc=true&sort=name&numberOfOrdersFrom=0&numberOfOrdersTo=0
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `saleor/graphql/utils/filters.py`
  Content:
  ```
  1 from django.utils import timezone
  2 
  3 from ..core.enums import ReportingPeriod
  4 
  5 
  6 def reporting_period_to_date(period):
  7     now = timezone.now()
  8     if period == ReportingPeriod.TODAY:
  9         start_date = now.replace(hour=0, minute=0, second=0, microsecond=0)
  10     elif period == ReportingPeriod.THIS_MONTH:
  11         start_date = now.replace(day=1, hour=0, minute=0, second=0, microsecond=0)
  12     else:
  13         raise ValueError("Unknown period: %s" % period)
  14     return start_date
  15 
  16 
  17 def filter_by_period(queryset, period, field_name):
  18     start_date = reporting_period_to_date(period)
  19     return queryset.filter(**{"%s__gte" % field_name: start_date})
  20 
  21 
  22 def filter_range_field(qs, field, value):
  23     gte, lte = value.get("gte"), value.get("lte")
  24     if gte:
  25         lookup = {f"{field}__gte": gte}
  26         qs = qs.filter(**lookup)
  27     if lte:
  28         lookup = {f"{field}__lte": lte}
  29         qs = qs.filter(**lookup)
  30     return qs
  31 
  32 
  33 def filter_by_id(object_type):
  34     from . import resolve_global_ids_to_primary_keys
  35 
  36     def inner(qs, _, value):
  37         if not value:
  38             return qs
  39         _, obj_pks = resolve_global_ids_to_primary_keys(value, object_type)
  40         return qs.filter(id__in=obj_pks)
  41 
  42     return inner
  43
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/saleor/graphql/utils/filters.py b/saleor/graphql/utils/filters.py
  --- a/saleor/graphql/utils/filters.py
  +++ b/saleor/graphql/utils/filters.py
  @@ -21,10 +21,10 @@
   
   def filter_range_field(qs, field, value):
       gte, lte = value.get("gte"), value.get("lte")
  -    if gte:
  +    if gte is not None:
           lookup = {f"{field}__gte": gte}
           qs = qs.filter(**lookup)
  -    if lte:
  +    if lte is not None:
           lookup = {f"{field}__lte": lte}
           qs = qs.filter(**lookup)
       return qs
  
verification_info: {"golden_diff": "diff --git a/saleor/graphql/utils/filters.py b/saleor/graphql/utils/filters.py\n--- a/saleor/graphql/utils/filters.py\n+++ b/saleor/graphql/utils/filters.py\n@@ -21,10 +21,10 @@\n \n def filter_range_field(qs, field, value):\n     gte, lte = value.get(\"gte\"), value.get(\"lte\")\n-    if gte:\n+    if gte is not None:\n         lookup = {f\"{field}__gte\": gte}\n         qs = qs.filter(**lookup)\n-    if lte:\n+    if lte is not None:\n         lookup = {f\"{field}__lte\": lte}\n         qs = qs.filter(**lookup)\n     return qs\n", "issue": "Unable to filter customers with 0 orders\n### **Steps to reproduce the problem:**\n```graphql\nquery Customers{\n  customers(filter: {numberOfOrders: {lte: 0, gte: 0}},  first: 10){\n    edges{\n      node{\n        id\n        email\n        orders{\n          totalCount\n        }\n      }\n    }\n    totalCount\n  }\n}\n```\n\n### **Current result:**\nBackend returns all customers instead of those with 0 orders\n\n### **Expected result:**\nReturn all customers with 0 orders\n\n### **Screenshots:**\n\n### **System information:**\n\n### **Environment:**\nmaster.staging core v3.8.0-a\n\n### **Additional info/links:**\nhttps://master.staging.saleor.cloud/dashboard/customers/?asc=true&sort=name&numberOfOrdersFrom=0&numberOfOrdersTo=0\n", "before_files": [{"content": "from django.utils import timezone\n\nfrom ..core.enums import ReportingPeriod\n\n\ndef reporting_period_to_date(period):\n    now = timezone.now()\n    if period == ReportingPeriod.TODAY:\n        start_date = now.replace(hour=0, minute=0, second=0, microsecond=0)\n    elif period == ReportingPeriod.THIS_MONTH:\n        start_date = now.replace(day=1, hour=0, minute=0, second=0, microsecond=0)\n    else:\n        raise ValueError(\"Unknown period: %s\" % period)\n    return start_date\n\n\ndef filter_by_period(queryset, period, field_name):\n    start_date = reporting_period_to_date(period)\n    return queryset.filter(**{\"%s__gte\" % field_name: start_date})\n\n\ndef filter_range_field(qs, field, value):\n    gte, lte = value.get(\"gte\"), value.get(\"lte\")\n    if gte:\n        lookup = {f\"{field}__gte\": gte}\n        qs = qs.filter(**lookup)\n    if lte:\n        lookup = {f\"{field}__lte\": lte}\n        qs = qs.filter(**lookup)\n    return qs\n\n\ndef filter_by_id(object_type):\n    from . import resolve_global_ids_to_primary_keys\n\n    def inner(qs, _, value):\n        if not value:\n            return qs\n        _, obj_pks = resolve_global_ids_to_primary_keys(value, object_type)\n        return qs.filter(id__in=obj_pks)\n\n    return inner\n", "path": "saleor/graphql/utils/filters.py"}], "after_files": [{"content": "from django.utils import timezone\n\nfrom ..core.enums import ReportingPeriod\n\n\ndef reporting_period_to_date(period):\n    now = timezone.now()\n    if period == ReportingPeriod.TODAY:\n        start_date = now.replace(hour=0, minute=0, second=0, microsecond=0)\n    elif period == ReportingPeriod.THIS_MONTH:\n        start_date = now.replace(day=1, hour=0, minute=0, second=0, microsecond=0)\n    else:\n        raise ValueError(\"Unknown period: %s\" % period)\n    return start_date\n\n\ndef filter_by_period(queryset, period, field_name):\n    start_date = reporting_period_to_date(period)\n    return queryset.filter(**{\"%s__gte\" % field_name: start_date})\n\n\ndef filter_range_field(qs, field, value):\n    gte, lte = value.get(\"gte\"), value.get(\"lte\")\n    if gte is not None:\n        lookup = {f\"{field}__gte\": gte}\n        qs = qs.filter(**lookup)\n    if lte is not None:\n        lookup = {f\"{field}__lte\": lte}\n        qs = qs.filter(**lookup)\n    return qs\n\n\ndef filter_by_id(object_type):\n    from . import resolve_global_ids_to_primary_keys\n\n    def inner(qs, _, value):\n        if not value:\n            return qs\n        _, obj_pks = resolve_global_ids_to_primary_keys(value, object_type)\n        return qs.filter(id__in=obj_pks)\n\n    return inner\n", "path": "saleor/graphql/utils/filters.py"}]}