From 56dda5eff4f57c1076d2d050ea6355588b30509e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 15 Sep 2019 23:41:32 +1000 Subject: [PATCH] Script to check for unstaged migrations --- .travis.yml | 2 +- InvenTree/common/models.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index fda3b78259..850e915d16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ before_install: - cd InvenTree && python3 manage.py createsuperuser --username InvenTreeAdmin --email admin@inventree.com --noinput && cd .. script: - - git ls-files --exclude-standard --others + - python3 ci\check_migration_files.py - make coverage - make style diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index 0b8795484b..da659b404f 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -68,6 +68,10 @@ class InvenTreeSetting(models.Model): description = models.CharField(max_length=200, blank=True, unique=False, help_text=_('Settings description')) + b_think = models.CharField(max_length=20, blank=True) + + a_thing = models.CharField(max_length=10, blank=False) + def validate_unique(self, exclude=None): """ Ensure that the key:value pair is unique. In addition to the base validators, this ensures that the 'key'