|
|
@@ -1,4 +1,4 @@
|
|
|
-# Generated by Django 6.1.2 on 2026-10-13 23:27
|
|
|
+# Generated by Django 6.1.2 on 2026-10-14 00:11
|
|
|
|
|
|
from decimal import Decimal
|
|
|
|
|
|
@@ -30,37 +30,61 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
length_unit="km",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("1000"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1000")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
length_unit="m",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
length_unit="cm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("0.01"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("0.01")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
length_unit="mi",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("1609.344"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1609.344")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
length_unit="ft",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("0.3048"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("0.3048")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
length_unit="in",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("length"), "*", models.Value(Decimal("0.0254"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("length"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("0.0254")),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -83,13 +107,19 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="lpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
max_flow_unit="m3ph",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("16.66666666666666666666666667")),
|
|
|
),
|
|
|
@@ -97,7 +127,9 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="gpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("3.785411784")),
|
|
|
),
|
|
|
@@ -122,19 +154,31 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
diameter_unit="mm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="cm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("10"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("10")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="in",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("25.4"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("25.4")),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -157,13 +201,19 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="lpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
max_flow_unit="m3ph",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("16.66666666666666666666666667")),
|
|
|
),
|
|
|
@@ -171,7 +221,9 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="gpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("3.785411784")),
|
|
|
),
|
|
|
@@ -196,19 +248,31 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
diameter_unit="mm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="cm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("10"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("10")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="in",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("25.4"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("25.4")),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -231,13 +295,19 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="lpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
max_flow_unit="m3ph",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("16.66666666666666666666666667")),
|
|
|
),
|
|
|
@@ -245,7 +315,9 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
max_flow_unit="gpm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_flow"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_flow"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("3.785411784")),
|
|
|
),
|
|
|
@@ -270,19 +342,31 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
diameter_unit="mm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="cm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("10"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("10")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="in",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("25.4"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("25.4")),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -305,19 +389,31 @@ class Migration(migrations.Migration):
|
|
|
models.When(
|
|
|
diameter_unit="mm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="cm",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("10"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("10")),
|
|
|
),
|
|
|
),
|
|
|
models.When(
|
|
|
diameter_unit="in",
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("diameter"), "*", models.Value(Decimal("25.4"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("diameter"), output_field=models.DecimalField()
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("25.4")),
|
|
|
),
|
|
|
),
|
|
|
),
|
|
|
@@ -341,7 +437,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -349,13 +448,21 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
weight_unit="g",
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -363,7 +470,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|
|
|
@@ -391,7 +501,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -399,13 +512,21 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
weight_unit="g",
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -413,7 +534,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|
|
|
@@ -441,7 +565,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -449,7 +576,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1")),
|
|
|
),
|
|
|
@@ -457,7 +587,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -465,7 +598,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|
|
|
@@ -493,7 +629,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -501,13 +640,21 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
weight_unit="g",
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -515,7 +662,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|
|
|
@@ -543,7 +693,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -551,7 +704,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1")),
|
|
|
),
|
|
|
@@ -559,7 +715,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -567,7 +726,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("max_weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("max_weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|
|
|
@@ -595,7 +757,10 @@ class Migration(migrations.Migration):
|
|
|
models.Case(
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("1000")),
|
|
|
),
|
|
|
@@ -603,13 +768,21 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"), "*", models.Value(Decimal("1"))
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
+ "*",
|
|
|
+ models.Value(Decimal("1")),
|
|
|
),
|
|
|
weight_unit="g",
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("453.592")),
|
|
|
),
|
|
|
@@ -617,7 +790,10 @@ class Migration(migrations.Migration):
|
|
|
),
|
|
|
models.When(
|
|
|
then=django.db.models.expressions.CombinedExpression(
|
|
|
- models.F("weight"),
|
|
|
+ django.db.models.functions.comparison.Cast(
|
|
|
+ models.F("weight"),
|
|
|
+ output_field=models.DecimalField(),
|
|
|
+ ),
|
|
|
"*",
|
|
|
models.Value(Decimal("28.3495")),
|
|
|
),
|