FIX: Fix supplier sort

This commit is contained in:
2020-02-19 14:46:39 +00:00
parent 1dacbc1444
commit 1559f9098d
3 changed files with 7 additions and 3 deletions

View File

@@ -94,7 +94,8 @@ class UserRegistrationTest(LiveServerTestCase):
# Read what the error is
alert = self.browser.find_element_by_css_selector(
'div.alert-danger').text
self.assertIn("password fields didn't match", alert)
# Note to future maintainers - mind out for smart quotes...
self.assertIn("password fields didnt match", alert)
# Passwords should be empty
self.assertEqual(password1.get_attribute('value'), '')

View File

@@ -1,4 +1,4 @@
# Generated by Django 2.0.13 on 2020-02-19 13:47
# Generated by Django 3.0.3 on 2020-02-19 14:44
from django.db import migrations
@@ -16,6 +16,6 @@ class Migration(migrations.Migration):
),
migrations.AlterModelOptions(
name='supplier',
options={},
options={'ordering': ['name']},
),
]

View File

@@ -41,6 +41,9 @@ class AssetStatus(models.Model):
@reversion.register
class Supplier(models.Model, RevisionMixin):
class Meta:
ordering = ['name']
name = models.CharField(max_length=80)
def get_absolute_url(self):