prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Phone number not saved from registration form
  When creating a new user, LEGO ignores the phone number inserted into the registration form.
  
  </issue>
  <code>
  [start of lego/apps/users/serializers/registration.py]
  1 from django.contrib.auth import password_validation
  2 from rest_framework import exceptions, serializers
  3 
  4 from lego.apps.users.models import User
  5 from lego.utils.functions import verify_captcha
  6 
  7 
  8 class RegistrationSerializer(serializers.ModelSerializer):
  9     captcha_response = serializers.CharField(required=True)
  10 
  11     def validate_captcha_response(self, captcha_response):
  12         if not verify_captcha(captcha_response):
  13             raise exceptions.ValidationError("invalid_captcha")
  14         return captcha_response
  15 
  16     class Meta:
  17         model = User
  18         fields = ("email", "captcha_response")
  19 
  20 
  21 class RegistrationConfirmationSerializer(serializers.ModelSerializer):
  22 
  23     password = serializers.CharField(required=True, write_only=True)
  24 
  25     def validate_username(self, username):
  26         username_exists = User.objects.filter(username__iexact=username).exists()
  27         if username_exists:
  28             raise exceptions.ValidationError("Username exists")
  29         return username
  30 
  31     def validate_password(self, password):
  32         password_validation.validate_password(password)
  33         return password
  34 
  35     class Meta:
  36         model = User
  37         fields = (
  38             "username",
  39             "first_name",
  40             "last_name",
  41             "gender",
  42             "password",
  43             "allergies",
  44         )
  45
  [end of lego/apps/users/serializers/registration.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/lego/apps/users/serializers/registration.py b/lego/apps/users/serializers/registration.py
  --- a/lego/apps/users/serializers/registration.py
  +++ b/lego/apps/users/serializers/registration.py
  @@ -41,4 +41,5 @@
               "gender",
               "password",
               "allergies",
  +            "phone_number",
           )
  
verification_info: {"golden_diff": "diff --git a/lego/apps/users/serializers/registration.py b/lego/apps/users/serializers/registration.py\n--- a/lego/apps/users/serializers/registration.py\n+++ b/lego/apps/users/serializers/registration.py\n@@ -41,4 +41,5 @@\n             \"gender\",\n             \"password\",\n             \"allergies\",\n+            \"phone_number\",\n         )\n", "issue": "Phone number not saved from registration form\nWhen creating a new user, LEGO ignores the phone number inserted into the registration form.\n", "before_files": [{"content": "from django.contrib.auth import password_validation\nfrom rest_framework import exceptions, serializers\n\nfrom lego.apps.users.models import User\nfrom lego.utils.functions import verify_captcha\n\n\nclass RegistrationSerializer(serializers.ModelSerializer):\n    captcha_response = serializers.CharField(required=True)\n\n    def validate_captcha_response(self, captcha_response):\n        if not verify_captcha(captcha_response):\n            raise exceptions.ValidationError(\"invalid_captcha\")\n        return captcha_response\n\n    class Meta:\n        model = User\n        fields = (\"email\", \"captcha_response\")\n\n\nclass RegistrationConfirmationSerializer(serializers.ModelSerializer):\n\n    password = serializers.CharField(required=True, write_only=True)\n\n    def validate_username(self, username):\n        username_exists = User.objects.filter(username__iexact=username).exists()\n        if username_exists:\n            raise exceptions.ValidationError(\"Username exists\")\n        return username\n\n    def validate_password(self, password):\n        password_validation.validate_password(password)\n        return password\n\n    class Meta:\n        model = User\n        fields = (\n            \"username\",\n            \"first_name\",\n            \"last_name\",\n            \"gender\",\n            \"password\",\n            \"allergies\",\n        )\n", "path": "lego/apps/users/serializers/registration.py"}]}