-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add validations for negative values in inventory and min quanityt (#2005
) Add validations for negative values in inventory Co-authored-by: Aakash Singh <[email protected]>
- Loading branch information
1 parent
182b43f
commit ce619ef
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
care/facility/migrations/0422_alter_facilityinventorylog_quantity_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 4.2.10 on 2024-03-22 11:21 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("facility", "0421_merge_20240318_1434"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="facilityinventorylog", | ||
name="quantity", | ||
field=models.FloatField( | ||
default=0, validators=[django.core.validators.MinValueValidator(0.0)] | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="facilityinventoryminquantity", | ||
name="min_quantity", | ||
field=models.FloatField( | ||
default=0, validators=[django.core.validators.MinValueValidator(0.0)] | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters