mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-08 00:08:49 +00:00
only values starting with int possible -> only positive values
This commit is contained in:
parent
7992755b37
commit
970cec590b
@ -248,8 +248,6 @@ class ReferenceIndexingSerializerMixin():
|
|||||||
for the BigIntegerField
|
for the BigIntegerField
|
||||||
"""
|
"""
|
||||||
def validate_reference(self, value):
|
def validate_reference(self, value):
|
||||||
if extract_int(value) < -models.BigIntegerField.MAX_BIGINT:
|
|
||||||
raise serializers.ValidationError('reference is to to small')
|
|
||||||
if extract_int(value) > models.BigIntegerField.MAX_BIGINT:
|
if extract_int(value) > models.BigIntegerField.MAX_BIGINT:
|
||||||
raise serializers.ValidationError('reference is to to big')
|
raise serializers.ValidationError('reference is to to big')
|
||||||
return value
|
return value
|
||||||
|
@ -124,16 +124,6 @@ class PurchaseOrderTest(OrderTest):
|
|||||||
expected_code=400
|
expected_code=400
|
||||||
)
|
)
|
||||||
|
|
||||||
# too small
|
|
||||||
self.post(
|
|
||||||
url,
|
|
||||||
{
|
|
||||||
'supplier': 1,
|
|
||||||
'reference': -huge_numer,
|
|
||||||
'description': 'PO not created via the API',
|
|
||||||
},
|
|
||||||
expected_code=400
|
|
||||||
)
|
|
||||||
|
|
||||||
def test_po_attachments(self):
|
def test_po_attachments(self):
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user