prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Tags with a '.' will crash
  Ref. http://moonshine.online.ntnu.no/article/10/online-far-ny-nettside
  
  
  </issue>
  <code>
  [start of apps/article/admin.py]
  1 from django.contrib import admin
  2 from apps.article.models import Article, Tag, ArticleTag
  3 from django.conf import settings
  4 from filebrowser.settings import VERSIONS, ADMIN_THUMBNAIL
  5 
  6 
  7 class ArticleTagAdmin(admin.ModelAdmin):
  8     model = ArticleTag
  9 
  10 
  11 class ArticleTagInline(admin.TabularInline):
  12     model = ArticleTag
  13     max_num = 99
  14     extra = 0
  15 
  16 
  17 class TagAdmin(admin.ModelAdmin):
  18     def save_model(self, request, obj, form, change):
  19         obj.changed_by = request.user
  20         if not change:
  21             obj.created_by = request.user
  22         obj.save()
  23 
  24 
  25 class ArticleAdmin(admin.ModelAdmin):
  26     inlines = (ArticleTagInline,)
  27     list_display = ("heading", "created_by", "changed_by")
  28 
  29     # set the created and changed by fields
  30     def save_model(self, request, obj, form, change):
  31         if (obj.image):
  32             obj.image.version_generate(ADMIN_THUMBNAIL).url
  33 
  34             # Itterate the different versions (by key)
  35             for ver in VERSIONS.keys():
  36                 # Check if the key start with article_ (if it does, we want to crop to that size)
  37                 if ver.startswith('article_'):
  38                     obj.image.version_generate(ver).url
  39 
  40         obj.changed_by = request.user
  41 
  42         if not change:
  43             obj.created_by = request.user
  44         obj.save()
  45 
  46     def save_formset(self, request, form, formset, change):
  47         instances = formset.save(commit=False)
  48         for instances in instances:
  49             instances.save()
  50 
  51 admin.site.register(Article, ArticleAdmin)
  52 admin.site.register(Tag, TagAdmin)
  53
  [end of apps/article/admin.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/apps/article/admin.py b/apps/article/admin.py
  --- a/apps/article/admin.py
  +++ b/apps/article/admin.py
  @@ -18,6 +18,7 @@
       def save_model(self, request, obj, form, change):
           obj.changed_by = request.user
           if not change:
  +            obj.name = obj.name.replace('.', '')
               obj.created_by = request.user
           obj.save()
  
verification_info: {"golden_diff": "diff --git a/apps/article/admin.py b/apps/article/admin.py\n--- a/apps/article/admin.py\n+++ b/apps/article/admin.py\n@@ -18,6 +18,7 @@\n     def save_model(self, request, obj, form, change):\n         obj.changed_by = request.user\n         if not change:\n+            obj.name = obj.name.replace('.', '')\n             obj.created_by = request.user\n         obj.save()\n", "issue": "Tags with a '.' will crash\nRef. http://moonshine.online.ntnu.no/article/10/online-far-ny-nettside\n\n", "before_files": [{"content": "from django.contrib import admin\nfrom apps.article.models import Article, Tag, ArticleTag\nfrom django.conf import settings\nfrom filebrowser.settings import VERSIONS, ADMIN_THUMBNAIL\n\n\nclass ArticleTagAdmin(admin.ModelAdmin):\n    model = ArticleTag\n\n\nclass ArticleTagInline(admin.TabularInline):\n    model = ArticleTag\n    max_num = 99\n    extra = 0\n\n\nclass TagAdmin(admin.ModelAdmin):\n    def save_model(self, request, obj, form, change):\n        obj.changed_by = request.user\n        if not change:\n            obj.created_by = request.user\n        obj.save()\n\n\nclass ArticleAdmin(admin.ModelAdmin):\n    inlines = (ArticleTagInline,)\n    list_display = (\"heading\", \"created_by\", \"changed_by\")\n\n    # set the created and changed by fields\n    def save_model(self, request, obj, form, change):\n        if (obj.image):\n            obj.image.version_generate(ADMIN_THUMBNAIL).url\n\n            # Itterate the different versions (by key)\n            for ver in VERSIONS.keys():\n                # Check if the key start with article_ (if it does, we want to crop to that size)\n                if ver.startswith('article_'):\n                    obj.image.version_generate(ver).url\n\n        obj.changed_by = request.user\n\n        if not change:\n            obj.created_by = request.user\n        obj.save()\n\n    def save_formset(self, request, form, formset, change):\n        instances = formset.save(commit=False)\n        for instances in instances:\n            instances.save()\n\nadmin.site.register(Article, ArticleAdmin)\nadmin.site.register(Tag, TagAdmin)\n", "path": "apps/article/admin.py"}]}