mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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
|
||||
"""
|
||||
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:
|
||||
raise serializers.ValidationError('reference is to to big')
|
||||
return value
|
||||
|
@ -124,16 +124,6 @@ class PurchaseOrderTest(OrderTest):
|
||||
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):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user