prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Fix intent default value to all examples, migration intent required
  
  
  </issue>
  <code>
  [start of bothub/common/migrations/0021_auto_20180921_1259.py]
  1 # Generated by Django 2.0.6 on 2018-09-21 12:59
  2 
  3 import django.core.validators
  4 from django.db import migrations, models
  5 import re
  6 
  7 
  8 class Migration(migrations.Migration):
  9 
  10     dependencies = [
  11         ('common', '0020_auto_20180813_1320'),
  12     ]
  13 
  14     operations = [
  15         migrations.AlterField(
  16             model_name='repositoryexample',
  17             name='intent',
  18             field=models.CharField(default='no_intent', help_text='Example intent reference', max_length=64, validators=[django.core.validators.RegexValidator(re.compile('^[-a-z0-9_]+\\Z'), 'Enter a valid value consisting of lowercase letters, numbers, underscores or hyphens.', 'invalid')], verbose_name='intent'),
  19         ),
  20     ]
  21
  [end of bothub/common/migrations/0021_auto_20180921_1259.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/bothub/common/migrations/0021_auto_20180921_1259.py b/bothub/common/migrations/0021_auto_20180921_1259.py
  --- a/bothub/common/migrations/0021_auto_20180921_1259.py
  +++ b/bothub/common/migrations/0021_auto_20180921_1259.py
  @@ -5,6 +5,11 @@
   import re
   
   
  +def populate_empty_intent(apps, *args):
  +    RepositoryExample = apps.get_model('common', 'RepositoryExample')
  +    RepositoryExample.objects.filter(intent='').update(intent='no_intent')
  +
  +
   class Migration(migrations.Migration):
   
       dependencies = [
  @@ -17,4 +22,5 @@
               name='intent',
               field=models.CharField(default='no_intent', help_text='Example intent reference', max_length=64, validators=[django.core.validators.RegexValidator(re.compile('^[-a-z0-9_]+\\Z'), 'Enter a valid value consisting of lowercase letters, numbers, underscores or hyphens.', 'invalid')], verbose_name='intent'),
           ),
  +        migrations.RunPython(populate_empty_intent),
       ]
  
verification_info: {"golden_diff": "diff --git a/bothub/common/migrations/0021_auto_20180921_1259.py b/bothub/common/migrations/0021_auto_20180921_1259.py\n--- a/bothub/common/migrations/0021_auto_20180921_1259.py\n+++ b/bothub/common/migrations/0021_auto_20180921_1259.py\n@@ -5,6 +5,11 @@\n import re\n \n \n+def populate_empty_intent(apps, *args):\n+    RepositoryExample = apps.get_model('common', 'RepositoryExample')\n+    RepositoryExample.objects.filter(intent='').update(intent='no_intent')\n+\n+\n class Migration(migrations.Migration):\n \n     dependencies = [\n@@ -17,4 +22,5 @@\n             name='intent',\n             field=models.CharField(default='no_intent', help_text='Example intent reference', max_length=64, validators=[django.core.validators.RegexValidator(re.compile('^[-a-z0-9_]+\\\\Z'), 'Enter a valid value consisting of lowercase letters, numbers, underscores or hyphens.', 'invalid')], verbose_name='intent'),\n         ),\n+        migrations.RunPython(populate_empty_intent),\n     ]\n", "issue": "Fix intent default value to all examples, migration intent required\n\n", "before_files": [{"content": "# Generated by Django 2.0.6 on 2018-09-21 12:59\n\nimport django.core.validators\nfrom django.db import migrations, models\nimport re\n\n\nclass Migration(migrations.Migration):\n\n    dependencies = [\n        ('common', '0020_auto_20180813_1320'),\n    ]\n\n    operations = [\n        migrations.AlterField(\n            model_name='repositoryexample',\n            name='intent',\n            field=models.CharField(default='no_intent', help_text='Example intent reference', max_length=64, validators=[django.core.validators.RegexValidator(re.compile('^[-a-z0-9_]+\\\\Z'), 'Enter a valid value consisting of lowercase letters, numbers, underscores or hyphens.', 'invalid')], verbose_name='intent'),\n        ),\n    ]\n", "path": "bothub/common/migrations/0021_auto_20180921_1259.py"}]}