From cfb56f7cfee9ad64d3b272ee4f85e44091b8e506 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 5 Mar 2019 13:08:40 -0500 Subject: [PATCH] Fixes #2962: Increase ExportTemplate mime_type field length --- CHANGELOG.md | 1 + .../0017_exporttemplate_mime_type_length.py | 18 ++++++++++++++++++ netbox/extras/models.py | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 netbox/extras/migrations/0017_exporttemplate_mime_type_length.py diff --git a/CHANGELOG.md b/CHANGELOG.md index d96ca2ad7..3a436d546 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ v2.5.8 (FUTURE) * [#2939](https://github.com/digitalocean/netbox/issues/2939) - Exclude circuit terminations from API interface connections endpoint * [#2952](https://github.com/digitalocean/netbox/issues/2952) - Added the `slug` field to the Tenant filter for use in the API and search function * [#2954](https://github.com/digitalocean/netbox/issues/2954) - Remove trailing slashes to fix root/template paths on Windows +* [#2962](https://github.com/digitalocean/netbox/issues/2962) - Increase ExportTemplate `mime_type` field length --- diff --git a/netbox/extras/migrations/0017_exporttemplate_mime_type_length.py b/netbox/extras/migrations/0017_exporttemplate_mime_type_length.py new file mode 100644 index 000000000..29283e0d1 --- /dev/null +++ b/netbox/extras/migrations/0017_exporttemplate_mime_type_length.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.7 on 2019-03-05 18:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('extras', '0016_exporttemplate_add_cable'), + ] + + operations = [ + migrations.AlterField( + model_name='exporttemplate', + name='mime_type', + field=models.CharField(blank=True, max_length=50), + ), + ] diff --git a/netbox/extras/models.py b/netbox/extras/models.py index d3b9f4eff..1b106a62a 100644 --- a/netbox/extras/models.py +++ b/netbox/extras/models.py @@ -357,7 +357,7 @@ class ExportTemplate(models.Model): ) template_code = models.TextField() mime_type = models.CharField( - max_length=15, + max_length=50, blank=True ) file_extension = models.CharField(