2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-07 07:48:50 +00:00

only values starting with int possible -> only positive values

This commit is contained in:
Matthias 2021-12-02 09:06:58 +01:00
parent 7992755b37
commit 970cec590b
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076
2 changed files with 0 additions and 12 deletions
InvenTree

@ -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):