mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-02-23 08:31:18 +00:00
Compare commits
3 Commits
81303b8ef8
...
be168c5ada
Author | SHA1 | Date | |
---|---|---|---|
be168c5ada | |||
b46ae6f856 | |||
ec0bcbf015 |
@ -3,6 +3,7 @@
|
||||
|
||||
import json
|
||||
from datetime import datetime, date
|
||||
from decimal import Decimal
|
||||
from urllib.parse import quote_plus
|
||||
from warnings import warn
|
||||
|
||||
@ -152,6 +153,8 @@ class TestAPI(TestCase):
|
||||
value = value.isoformat()
|
||||
elif isinstance(value, ImageFieldFile):
|
||||
value = value.name
|
||||
elif isinstance(value, Decimal):
|
||||
value = str(value)
|
||||
query = json.dumps({field.name: value})
|
||||
|
||||
# Create sample permission
|
||||
|
@ -3511,6 +3511,7 @@
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
135,
|
||||
137,
|
||||
143,
|
||||
147,
|
||||
@ -3521,8 +3522,7 @@
|
||||
176,
|
||||
177,
|
||||
180,
|
||||
181,
|
||||
182
|
||||
181
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Generated by Django 2.2.19 on 2021-03-13 11:35
|
||||
# Generated by Django 2.2.19 on 2021-03-21 09:34
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
@ -15,7 +15,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='product',
|
||||
name='quantity',
|
||||
field=models.FloatField(validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
|
||||
field=models.DecimalField(decimal_places=2, max_digits=7, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Quantity'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='specialtransactionproxy',
|
@ -132,7 +132,9 @@ class Product(models.Model):
|
||||
verbose_name=_("Designation"),
|
||||
)
|
||||
|
||||
quantity = models.FloatField(
|
||||
quantity = models.DecimalField(
|
||||
decimal_places=2,
|
||||
max_digits=7,
|
||||
verbose_name=_("Quantity"),
|
||||
validators=[MinValueValidator(0)],
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user