prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Add Safe App Provider information
  The service should (optionally) include information about the provider of the application.
  
  The provider information should have at least the following fields:
  
  ```json
  {
    "name" : <string>,
    "url": <string>
  }
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `src/safe_apps/admin.py`
  Content:
  ```
  1 from django.contrib import admin
  2 
  3 from .models import SafeApp
  4 
  5 admin.site.register(SafeApp)
  6
  ```
  
  Path: `src/safe_apps/models.py`
  Content:
  ```
  1 from django.contrib.postgres.fields import ArrayField
  2 from django.db import models
  3 
  4 
  5 class SafeApp(models.Model):
  6     url = models.URLField(primary_key=True)
  7     name = models.CharField(max_length=200)
  8     icon_url = models.URLField()
  9     description = models.CharField(max_length=200)
  10     networks = ArrayField(models.IntegerField())
  11
  ```
  
  Path: `src/safe_apps/migrations/0001_initial.py`
  Content:
  ```
  1 # Generated by Django 3.2 on 2021-04-28 13:39
  2 
  3 import django.contrib.postgres.fields
  4 from django.db import migrations, models
  5 
  6 
  7 class Migration(migrations.Migration):
  8 
  9     initial = True
  10 
  11     dependencies = [
  12     ]
  13 
  14     operations = [
  15         migrations.CreateModel(
  16             name='SafeApp',
  17             fields=[
  18                 ('url', models.URLField(primary_key=True, serialize=False)),
  19                 ('name', models.CharField(max_length=200)),
  20                 ('icon_url', models.URLField()),
  21                 ('description', models.CharField(max_length=200)),
  22                 ('networks', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)),
  23             ],
  24         ),
  25     ]
  26
  ```
  --- 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/src/safe_apps/admin.py b/src/safe_apps/admin.py
  --- a/src/safe_apps/admin.py
  +++ b/src/safe_apps/admin.py
  @@ -1,5 +1,6 @@
   from django.contrib import admin
   
  -from .models import SafeApp
  +from .models import SafeApp, Provider
   
  -admin.site.register(SafeApp)
  +models = [SafeApp, Provider]
  +admin.site.register(models)
  diff --git a/src/safe_apps/migrations/0001_initial.py b/src/safe_apps/migrations/0001_initial.py
  --- a/src/safe_apps/migrations/0001_initial.py
  +++ b/src/safe_apps/migrations/0001_initial.py
  @@ -1,7 +1,8 @@
  -# Generated by Django 3.2 on 2021-04-28 13:39
  +# Generated by Django 3.2 on 2021-04-29 08:22
   
   import django.contrib.postgres.fields
   from django.db import migrations, models
  +import django.db.models.deletion
   
   
   class Migration(migrations.Migration):
  @@ -12,6 +13,13 @@
       ]
   
       operations = [
  +        migrations.CreateModel(
  +            name='Provider',
  +            fields=[
  +                ('url', models.URLField(primary_key=True, serialize=False)),
  +                ('name', models.CharField(max_length=200)),
  +            ],
  +        ),
           migrations.CreateModel(
               name='SafeApp',
               fields=[
  @@ -20,6 +28,7 @@
                   ('icon_url', models.URLField()),
                   ('description', models.CharField(max_length=200)),
                   ('networks', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)),
  +                ('provider', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='safe_apps.provider')),
               ],
           ),
       ]
  diff --git a/src/safe_apps/models.py b/src/safe_apps/models.py
  --- a/src/safe_apps/models.py
  +++ b/src/safe_apps/models.py
  @@ -2,9 +2,21 @@
   from django.db import models
   
   
  +class Provider(models.Model):
  +    url = models.URLField(primary_key=True)
  +    name = models.CharField(max_length=200)
  +
  +    def __str__(self):
  +        return f'{self.name} | {self.url}'
  +
  +
   class SafeApp(models.Model):
       url = models.URLField(primary_key=True)
       name = models.CharField(max_length=200)
       icon_url = models.URLField()
       description = models.CharField(max_length=200)
       networks = ArrayField(models.IntegerField())
  +    provider = models.ForeignKey(Provider, null=True, on_delete=models.SET_NULL)
  +
  +    def __str__(self):
  +        return f'{self.name} | {self.url} | networks={self.networks}'
  
verification_info: {"golden_diff": "diff --git a/src/safe_apps/admin.py b/src/safe_apps/admin.py\n--- a/src/safe_apps/admin.py\n+++ b/src/safe_apps/admin.py\n@@ -1,5 +1,6 @@\n from django.contrib import admin\n \n-from .models import SafeApp\n+from .models import SafeApp, Provider\n \n-admin.site.register(SafeApp)\n+models = [SafeApp, Provider]\n+admin.site.register(models)\ndiff --git a/src/safe_apps/migrations/0001_initial.py b/src/safe_apps/migrations/0001_initial.py\n--- a/src/safe_apps/migrations/0001_initial.py\n+++ b/src/safe_apps/migrations/0001_initial.py\n@@ -1,7 +1,8 @@\n-# Generated by Django 3.2 on 2021-04-28 13:39\n+# Generated by Django 3.2 on 2021-04-29 08:22\n \n import django.contrib.postgres.fields\n from django.db import migrations, models\n+import django.db.models.deletion\n \n \n class Migration(migrations.Migration):\n@@ -12,6 +13,13 @@\n     ]\n \n     operations = [\n+        migrations.CreateModel(\n+            name='Provider',\n+            fields=[\n+                ('url', models.URLField(primary_key=True, serialize=False)),\n+                ('name', models.CharField(max_length=200)),\n+            ],\n+        ),\n         migrations.CreateModel(\n             name='SafeApp',\n             fields=[\n@@ -20,6 +28,7 @@\n                 ('icon_url', models.URLField()),\n                 ('description', models.CharField(max_length=200)),\n                 ('networks', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)),\n+                ('provider', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='safe_apps.provider')),\n             ],\n         ),\n     ]\ndiff --git a/src/safe_apps/models.py b/src/safe_apps/models.py\n--- a/src/safe_apps/models.py\n+++ b/src/safe_apps/models.py\n@@ -2,9 +2,21 @@\n from django.db import models\n \n \n+class Provider(models.Model):\n+    url = models.URLField(primary_key=True)\n+    name = models.CharField(max_length=200)\n+\n+    def __str__(self):\n+        return f'{self.name} | {self.url}'\n+\n+\n class SafeApp(models.Model):\n     url = models.URLField(primary_key=True)\n     name = models.CharField(max_length=200)\n     icon_url = models.URLField()\n     description = models.CharField(max_length=200)\n     networks = ArrayField(models.IntegerField())\n+    provider = models.ForeignKey(Provider, null=True, on_delete=models.SET_NULL)\n+\n+    def __str__(self):\n+        return f'{self.name} | {self.url} | networks={self.networks}'\n", "issue": "Add Safe App Provider information\nThe service should (optionally) include information about the provider of the application.\r\n\r\nThe provider information should have at least the following fields:\r\n\r\n```json\r\n{\r\n  \"name\" : <string>,\r\n  \"url\": <string>\r\n}\r\n```\n", "before_files": [{"content": "from django.contrib import admin\n\nfrom .models import SafeApp\n\nadmin.site.register(SafeApp)\n", "path": "src/safe_apps/admin.py"}, {"content": "from django.contrib.postgres.fields import ArrayField\nfrom django.db import models\n\n\nclass SafeApp(models.Model):\n    url = models.URLField(primary_key=True)\n    name = models.CharField(max_length=200)\n    icon_url = models.URLField()\n    description = models.CharField(max_length=200)\n    networks = ArrayField(models.IntegerField())\n", "path": "src/safe_apps/models.py"}, {"content": "# Generated by Django 3.2 on 2021-04-28 13:39\n\nimport django.contrib.postgres.fields\nfrom django.db import migrations, models\n\n\nclass Migration(migrations.Migration):\n\n    initial = True\n\n    dependencies = [\n    ]\n\n    operations = [\n        migrations.CreateModel(\n            name='SafeApp',\n            fields=[\n                ('url', models.URLField(primary_key=True, serialize=False)),\n                ('name', models.CharField(max_length=200)),\n                ('icon_url', models.URLField()),\n                ('description', models.CharField(max_length=200)),\n                ('networks', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)),\n            ],\n        ),\n    ]\n", "path": "src/safe_apps/migrations/0001_initial.py"}], "after_files": [{"content": "from django.contrib import admin\n\nfrom .models import SafeApp, Provider\n\nmodels = [SafeApp, Provider]\nadmin.site.register(models)\n", "path": "src/safe_apps/admin.py"}, {"content": "from django.contrib.postgres.fields import ArrayField\nfrom django.db import models\n\n\nclass Provider(models.Model):\n    url = models.URLField(primary_key=True)\n    name = models.CharField(max_length=200)\n\n    def __str__(self):\n        return f'{self.name} | {self.url}'\n\n\nclass SafeApp(models.Model):\n    url = models.URLField(primary_key=True)\n    name = models.CharField(max_length=200)\n    icon_url = models.URLField()\n    description = models.CharField(max_length=200)\n    networks = ArrayField(models.IntegerField())\n    provider = models.ForeignKey(Provider, null=True, on_delete=models.SET_NULL)\n\n    def __str__(self):\n        return f'{self.name} | {self.url} | networks={self.networks}'\n", "path": "src/safe_apps/models.py"}, {"content": "# Generated by Django 3.2 on 2021-04-29 08:22\n\nimport django.contrib.postgres.fields\nfrom django.db import migrations, models\nimport django.db.models.deletion\n\n\nclass Migration(migrations.Migration):\n\n    initial = True\n\n    dependencies = [\n    ]\n\n    operations = [\n        migrations.CreateModel(\n            name='Provider',\n            fields=[\n                ('url', models.URLField(primary_key=True, serialize=False)),\n                ('name', models.CharField(max_length=200)),\n            ],\n        ),\n        migrations.CreateModel(\n            name='SafeApp',\n            fields=[\n                ('url', models.URLField(primary_key=True, serialize=False)),\n                ('name', models.CharField(max_length=200)),\n                ('icon_url', models.URLField()),\n                ('description', models.CharField(max_length=200)),\n                ('networks', django.contrib.postgres.fields.ArrayField(base_field=models.IntegerField(), size=None)),\n                ('provider', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='safe_apps.provider')),\n            ],\n        ),\n    ]\n", "path": "src/safe_apps/migrations/0001_initial.py"}]}