From 7c9201730a826684bfc32491676b6013836eebe1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 1 Dec 2021 23:36:44 +0100 Subject: [PATCH] add warning to ReferenceIndexingMixin to use the serializer mixin --- InvenTree/InvenTree/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/InvenTree/InvenTree/models.py b/InvenTree/InvenTree/models.py index cda4677d27..12fcf87c05 100644 --- a/InvenTree/InvenTree/models.py +++ b/InvenTree/InvenTree/models.py @@ -49,6 +49,9 @@ class ReferenceIndexingMixin(models.Model): """ A mixin for keeping track of numerical copies of the "reference" field. + !!DANGER!! always add `ReferenceIndexingSerializerMixin`to all your models serializers to + ensure the reference field is not too big + Here, we attempt to convert a "reference" field value (char) to an integer, for performing fast natural sorting.