prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  from_pydantic() converts False values to None
  When calling `from_pydantic()`, values consistent with `bool(value) == False` may be replaced with None. 
  
  This recreates the issue:
  ```
  from pydantic import BaseModel
  import strawberry
  
  class PydanticClass(BaseModel):
      str1: str
      str2: str
      bool1: bool
      bool2: bool
  
  @strawberry.experimental.pydantic.type(
      model=PydanticClass,
      fields=['str1', 'str2', 'bool1', 'bool2']
  )
  class StrawberryClass:
      pass
  
  str1 = 'nonempty'
  str2 = ''
  bool1 = True
  bool2 = False
  
  myobj = PydanticClass(
      str1=str1,
      str2=str2,
      bool1=bool1,
      bool2=bool2
  )
  print('pydantic obj:', myobj)
  
  converted = StrawberryClass.from_pydantic(myobj)
  print('converted:', converted)
  ```
  
  The output:
  ```
  pydantic obj: str1='nonempty' str2='' bool1=True bool2=False
  converted obj: StrawberryClass(str1='nonempty', str2=None, bool1=True, bool2=None)
  ```
  Both str2 and bool2 were converted to None.
  
  Location of the bug: https://github.com/strawberry-graphql/strawberry/blob/main/strawberry/experimental/pydantic/conversion.py#L10
  
  
  
  </issue>
  <code>
  [start of strawberry/experimental/pydantic/conversion.py]
  1 from typing import cast
  2 
  3 from strawberry.field import StrawberryField
  4 from strawberry.scalars import is_scalar
  5 
  6 
  7 def _convert_from_pydantic_to_strawberry_field(
  8     field: StrawberryField, data_from_model=None, extra=None
  9 ):
  10     data = data_from_model or extra
  11 
  12     if field.is_list:
  13         assert field.child is not None
  14 
  15         items = [None for _ in data]
  16 
  17         for index, item in enumerate(data):
  18             items[index] = _convert_from_pydantic_to_strawberry_field(
  19                 field.child,
  20                 data_from_model=item,
  21                 extra=extra[index] if extra else None,
  22             )
  23 
  24         return items
  25     elif is_scalar(field.type):  # type: ignore
  26         return data
  27     else:
  28         return convert_pydantic_model_to_strawberry_class(
  29             field.type, model_instance=data_from_model, extra=extra
  30         )
  31 
  32 
  33 def convert_pydantic_model_to_strawberry_class(cls, *, model_instance=None, extra=None):
  34     extra = extra or {}
  35     kwargs = {}
  36 
  37     for field in cls._type_definition.fields:
  38         field = cast(StrawberryField, field)
  39         python_name = field.python_name
  40 
  41         data_from_extra = extra.get(python_name, None)
  42         data_from_model = (
  43             getattr(model_instance, python_name, None) if model_instance else None
  44         )
  45         kwargs[python_name] = _convert_from_pydantic_to_strawberry_field(
  46             field, data_from_model, extra=data_from_extra
  47         )
  48 
  49     return cls(**kwargs)
  50
  [end of strawberry/experimental/pydantic/conversion.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/strawberry/experimental/pydantic/conversion.py b/strawberry/experimental/pydantic/conversion.py
  --- a/strawberry/experimental/pydantic/conversion.py
  +++ b/strawberry/experimental/pydantic/conversion.py
  @@ -7,7 +7,7 @@
   def _convert_from_pydantic_to_strawberry_field(
       field: StrawberryField, data_from_model=None, extra=None
   ):
  -    data = data_from_model or extra
  +    data = data_from_model if data_from_model is not None else extra
   
       if field.is_list:
           assert field.child is not None
  
verification_info: {"golden_diff": "diff --git a/strawberry/experimental/pydantic/conversion.py b/strawberry/experimental/pydantic/conversion.py\n--- a/strawberry/experimental/pydantic/conversion.py\n+++ b/strawberry/experimental/pydantic/conversion.py\n@@ -7,7 +7,7 @@\n def _convert_from_pydantic_to_strawberry_field(\n     field: StrawberryField, data_from_model=None, extra=None\n ):\n-    data = data_from_model or extra\n+    data = data_from_model if data_from_model is not None else extra\n \n     if field.is_list:\n         assert field.child is not None\n", "issue": "from_pydantic() converts False values to None\nWhen calling `from_pydantic()`, values consistent with `bool(value) == False` may be replaced with None. \r\n\r\nThis recreates the issue:\r\n```\r\nfrom pydantic import BaseModel\r\nimport strawberry\r\n\r\nclass PydanticClass(BaseModel):\r\n    str1: str\r\n    str2: str\r\n    bool1: bool\r\n    bool2: bool\r\n\r\n@strawberry.experimental.pydantic.type(\r\n    model=PydanticClass,\r\n    fields=['str1', 'str2', 'bool1', 'bool2']\r\n)\r\nclass StrawberryClass:\r\n    pass\r\n\r\nstr1 = 'nonempty'\r\nstr2 = ''\r\nbool1 = True\r\nbool2 = False\r\n\r\nmyobj = PydanticClass(\r\n    str1=str1,\r\n    str2=str2,\r\n    bool1=bool1,\r\n    bool2=bool2\r\n)\r\nprint('pydantic obj:', myobj)\r\n\r\nconverted = StrawberryClass.from_pydantic(myobj)\r\nprint('converted:', converted)\r\n```\r\n\r\nThe output:\r\n```\r\npydantic obj: str1='nonempty' str2='' bool1=True bool2=False\r\nconverted obj: StrawberryClass(str1='nonempty', str2=None, bool1=True, bool2=None)\r\n```\r\nBoth str2 and bool2 were converted to None.\r\n\r\nLocation of the bug: https://github.com/strawberry-graphql/strawberry/blob/main/strawberry/experimental/pydantic/conversion.py#L10\r\n\r\n\n", "before_files": [{"content": "from typing import cast\n\nfrom strawberry.field import StrawberryField\nfrom strawberry.scalars import is_scalar\n\n\ndef _convert_from_pydantic_to_strawberry_field(\n    field: StrawberryField, data_from_model=None, extra=None\n):\n    data = data_from_model or extra\n\n    if field.is_list:\n        assert field.child is not None\n\n        items = [None for _ in data]\n\n        for index, item in enumerate(data):\n            items[index] = _convert_from_pydantic_to_strawberry_field(\n                field.child,\n                data_from_model=item,\n                extra=extra[index] if extra else None,\n            )\n\n        return items\n    elif is_scalar(field.type):  # type: ignore\n        return data\n    else:\n        return convert_pydantic_model_to_strawberry_class(\n            field.type, model_instance=data_from_model, extra=extra\n        )\n\n\ndef convert_pydantic_model_to_strawberry_class(cls, *, model_instance=None, extra=None):\n    extra = extra or {}\n    kwargs = {}\n\n    for field in cls._type_definition.fields:\n        field = cast(StrawberryField, field)\n        python_name = field.python_name\n\n        data_from_extra = extra.get(python_name, None)\n        data_from_model = (\n            getattr(model_instance, python_name, None) if model_instance else None\n        )\n        kwargs[python_name] = _convert_from_pydantic_to_strawberry_field(\n            field, data_from_model, extra=data_from_extra\n        )\n\n    return cls(**kwargs)\n", "path": "strawberry/experimental/pydantic/conversion.py"}]}