mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-14 19:15:41 +00:00
Part stuff
This commit is contained in:
21
InvenTree/stock/migrations/0002_auto_20180430_1218.py
Normal file
21
InvenTree/stock/migrations/0002_auto_20180430_1218.py
Normal file
@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.12 on 2018-04-30 12:18
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('stock', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='stockitem',
|
||||
name='quantity',
|
||||
field=models.PositiveIntegerField(default=1, validators=[django.core.validators.MinValueValidator(0)]),
|
||||
),
|
||||
]
|
@ -130,7 +130,7 @@ class StockItem(models.Model):
|
||||
# build = models.ForeignKey('build.Build', on_delete=models.SET_NULL, blank=True, null=True)
|
||||
|
||||
# Quantity of this stock item. Value may be overridden by other settings
|
||||
quantity = models.PositiveIntegerField(validators=[MinValueValidator(0)])
|
||||
quantity = models.PositiveIntegerField(validators=[MinValueValidator(0)], default=1)
|
||||
|
||||
# Last time this item was updated (set automagically)
|
||||
updated = models.DateField(auto_now=True)
|
||||
|
Reference in New Issue
Block a user