prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Tags with a '.' will crash
  Ref. http://moonshine.online.ntnu.no/article/10/online-far-ny-nettside
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `apps/article/admin.py`
  Content:
  ```
  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 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/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"}], "after_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.name = obj.name.replace('.', '')\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"}]}