diff --git a/src/documents/migrations/1054_customfieldinstance_value_monetary_amount_and_more.py b/src/documents/migrations/1054_customfieldinstance_value_monetary_amount_and_more.py index 0bc135646..92d45de33 100644 --- a/src/documents/migrations/1054_customfieldinstance_value_monetary_amount_and_more.py +++ b/src/documents/migrations/1054_customfieldinstance_value_monetary_amount_and_more.py @@ -1,4 +1,4 @@ -# Generated by Django 5.1.1 on 2024-09-29 16:13 +# Generated by Django 5.1.1 on 2024-09-29 16:26 import django.db.models.functions.comparison import django.db.models.functions.text @@ -23,7 +23,7 @@ class Migration(migrations.Migration): django.db.models.functions.text.Substr("value_monetary", 1), output_field=models.DecimalField( decimal_places=2, - max_digits=125, + max_digits=65, ), ), value_monetary__regex="^\\d+", @@ -32,12 +32,12 @@ class Migration(migrations.Migration): django.db.models.functions.text.Substr("value_monetary", 4), output_field=models.DecimalField( decimal_places=2, - max_digits=125, + max_digits=65, ), ), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), ), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), ), ), migrations.AlterField( diff --git a/src/documents/models.py b/src/documents/models.py index e10de523d..80476bffa 100644 --- a/src/documents/models.py +++ b/src/documents/models.py @@ -932,17 +932,17 @@ class CustomFieldInstance(models.Model): value_monetary__regex=r"^\d+", then=Cast( Substr("value_monetary", 1), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), ), ), # If the value starts with a 3-char currency symbol, use the rest of the string default=Cast( Substr("value_monetary", 4), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), ), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), ), - output_field=models.DecimalField(decimal_places=2, max_digits=125), + output_field=models.DecimalField(decimal_places=2, max_digits=65), db_persist=True, )