prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Phone number not saved from registration form
  When creating a new user, LEGO ignores the phone number inserted into the registration form.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `lego/apps/users/serializers/registration.py`
  Content:
  ```
  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 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/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"}], "after_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            \"phone_number\",\n        )\n", "path": "lego/apps/users/serializers/registration.py"}]}