2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-01 13:06:45 +00:00

Script to check for unstaged migrations

This commit is contained in:
Oliver Walters 2019-09-15 23:41:32 +10:00
parent 180df8f110
commit 56dda5eff4
2 changed files with 5 additions and 1 deletions

View File

@ -15,7 +15,7 @@ before_install:
- cd InvenTree && python3 manage.py createsuperuser --username InvenTreeAdmin --email admin@inventree.com --noinput && cd .. - cd InvenTree && python3 manage.py createsuperuser --username InvenTreeAdmin --email admin@inventree.com --noinput && cd ..
script: script:
- git ls-files --exclude-standard --others - python3 ci\check_migration_files.py
- make coverage - make coverage
- make style - make style

View File

@ -68,6 +68,10 @@ class InvenTreeSetting(models.Model):
description = models.CharField(max_length=200, blank=True, unique=False, help_text=_('Settings description')) 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): def validate_unique(self, exclude=None):
""" Ensure that the key:value pair is unique. """ Ensure that the key:value pair is unique.
In addition to the base validators, this ensures that the 'key' In addition to the base validators, this ensures that the 'key'