From 199ffde28395a57b2530f2c65c2794109050e4fe Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Thu, 10 May 2018 17:52:55 -0400 Subject: [PATCH] Sane scanner source paper source now defaults to blank. Signed-off-by: Roberto Rosario --- HISTORY.rst | 1 + .../migrations/0017_auto_20180510_2151.py | 20 +++++++++++++++++++ mayan/apps/sources/models.py | 6 ++---- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 mayan/apps/sources/migrations/0017_auto_20180510_2151.py diff --git a/HISTORY.rst b/HISTORY.rst index 40381abfd5..6d2f6fa29d 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -159,6 +159,7 @@ MAYAN_DEBUG. - Stricter defaults. CELERY_ALWAYS_EAGER to False, ALLOWED_HOSTS to ['127.0.0.1', 'localhost', '[::1]']. - New initialization command. Creates media/system and populates the SECRET_KEY and VERSION files. +- Sane scanner source paper source now defaults to blank. 2.7.3 (2017-09-11) ================== diff --git a/mayan/apps/sources/migrations/0017_auto_20180510_2151.py b/mayan/apps/sources/migrations/0017_auto_20180510_2151.py new file mode 100644 index 0000000000..030126296c --- /dev/null +++ b/mayan/apps/sources/migrations/0017_auto_20180510_2151.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.11 on 2018-05-10 21:51 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('sources', '0016_auto_20170630_2040'), + ] + + operations = [ + migrations.AlterField( + model_name='sanescanner', + name='source', + field=models.CharField(blank=True, choices=[('flatbed', 'Flatbed'), ('Automatic Document Feeder', 'Document feeder')], help_text='Selects the scan source (such as a document-feeder). If this option is not supported by your scanner, leave it blank.', max_length=32, null=True, verbose_name='Paper source'), + ), + ] diff --git a/mayan/apps/sources/models.py b/mayan/apps/sources/models.py index 08872b2bb9..c6b6ee4de5 100644 --- a/mayan/apps/sources/models.py +++ b/mayan/apps/sources/models.py @@ -189,12 +189,10 @@ class SaneScanner(InteractiveSource): ), verbose_name=_('Resolution') ) source = models.CharField( - blank=True, choices=SCANNER_SOURCE_CHOICES, - default=SCANNER_SOURCE_FLATBED, help_text=_( + blank=True, choices=SCANNER_SOURCE_CHOICES, help_text=_( 'Selects the scan source (such as a document-feeder). If this ' 'option is not supported by your scanner, leave it blank.' - ), max_length=32, - verbose_name=_('Paper source') + ), max_length=32, null=True, verbose_name=_('Paper source') ) adf_mode = models.CharField( blank=True, choices=SCANNER_ADF_MODE_CHOICES,