mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Style fixes
This commit is contained in:
parent
c62ba5eb12
commit
9475af62ae
@ -48,7 +48,7 @@ class InvenTreeModelSerializer(serializers.ModelSerializer):
|
|||||||
this class ensures that the underlying model is also validated.
|
this class ensures that the underlying model is also validated.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
# Run any native validation checks first (may throw an ValidationError)
|
# Run any native validation checks first (may raise a ValidationError)
|
||||||
data = super().run_validation(data)
|
data = super().run_validation(data)
|
||||||
|
|
||||||
# Now ensure the underlying model is correct
|
# Now ensure the underlying model is correct
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from django.db import models
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from rest_framework import status
|
from rest_framework import status
|
||||||
|
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
@ -438,7 +439,8 @@ class PartDetailTests(InvenTreeAPITestCase):
|
|||||||
url = reverse('api-part-detail', kwargs={'pk': pk})
|
url = reverse('api-part-detail', kwargs={'pk': pk})
|
||||||
|
|
||||||
# Attempt to alter the revision code
|
# Attempt to alter the revision code
|
||||||
response = self.client.patch(url,
|
response = self.client.patch(
|
||||||
|
url,
|
||||||
{
|
{
|
||||||
'revision': 'A',
|
'revision': 'A',
|
||||||
},
|
},
|
||||||
@ -448,7 +450,8 @@ class PartDetailTests(InvenTreeAPITestCase):
|
|||||||
self.assertEqual(response.status_code, 400)
|
self.assertEqual(response.status_code, 400)
|
||||||
|
|
||||||
# But we *can* change it to a unique revision code
|
# But we *can* change it to a unique revision code
|
||||||
response = self.client.patch(url,
|
response = self.client.patch(
|
||||||
|
url,
|
||||||
{
|
{
|
||||||
'revision': 'C',
|
'revision': 'C',
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,8 @@ class PartTest(TestCase):
|
|||||||
|
|
||||||
self.assertEqual(Part.objects.count(), n + 1)
|
self.assertEqual(Part.objects.count(), n + 1)
|
||||||
|
|
||||||
part = Part(category=cat,
|
part = Part(
|
||||||
|
category=cat,
|
||||||
name='part',
|
name='part',
|
||||||
description='description',
|
description='description',
|
||||||
IPN='IPN',
|
IPN='IPN',
|
||||||
|
Loading…
Reference in New Issue
Block a user