mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/inventree/InvenTree into matmair/issue3005
This commit is contained in:
		| @@ -2,9 +2,6 @@ | ||||
| JSON API for the Build app | ||||
| """ | ||||
|  | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from django.urls import include, re_path | ||||
|  | ||||
| from rest_framework import filters, generics | ||||
|   | ||||
| @@ -2,8 +2,6 @@ | ||||
| Build database model definitions | ||||
| """ | ||||
|  | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
| import decimal | ||||
|  | ||||
| import os | ||||
| @@ -778,7 +776,7 @@ class Build(MPTTModel, ReferenceIndexingMixin): | ||||
|         if not output.is_building: | ||||
|             raise ValidationError(_("Build output is already completed")) | ||||
|  | ||||
|         if not output.build == self: | ||||
|         if output.build != self: | ||||
|             raise ValidationError(_("Build output does not match Build Order")) | ||||
|  | ||||
|         # Unallocate all build items against the output | ||||
| @@ -1241,7 +1239,7 @@ class BuildItem(models.Model): | ||||
|                 }) | ||||
|  | ||||
|             # Quantity must be 1 for serialized stock | ||||
|             if self.stock_item.serialized and not self.quantity == 1: | ||||
|             if self.stock_item.serialized and self.quantity != 1: | ||||
|                 raise ValidationError({ | ||||
|                     'quantity': _('Quantity must be 1 for serialized stock') | ||||
|                 }) | ||||
|   | ||||
| @@ -2,9 +2,6 @@ | ||||
| JSON serializers for Build API | ||||
| """ | ||||
|  | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from django.db import transaction | ||||
| from django.core.exceptions import ValidationError as DjangoValidationError | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|   | ||||
| @@ -2,9 +2,6 @@ | ||||
| Django views for interacting with Build objects | ||||
| """ | ||||
|  | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
| from django.views.generic import DetailView, ListView | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user