mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP style fixes
This commit is contained in:
parent
6fd1abb07a
commit
758e402a66
@ -5,7 +5,6 @@ JSON API for the Stock app
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from decimal import Decimal, InvalidOperation
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
@ -17,7 +16,6 @@ from django.db.models import Q
|
||||
|
||||
from rest_framework import status
|
||||
from rest_framework.serializers import ValidationError
|
||||
from rest_framework.views import APIView
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import generics, filters, permissions
|
||||
|
||||
@ -136,11 +134,11 @@ class StockAdjustView(generics.CreateAPIView):
|
||||
|
||||
def get_serializer_context(self):
|
||||
|
||||
context = super().get_serializer_context()
|
||||
context = super().get_serializer_context()
|
||||
|
||||
context['request'] = self.request
|
||||
context['request'] = self.request
|
||||
|
||||
return context
|
||||
return context
|
||||
|
||||
|
||||
class StockCount(StockAdjustView):
|
||||
|
@ -466,7 +466,7 @@ class StockAdjustmentSerializer(serializers.Serializer):
|
||||
|
||||
class StockCountSerializer(StockAdjustmentSerializer):
|
||||
"""
|
||||
Serializer for counting stock items
|
||||
Serializer for counting stock items
|
||||
"""
|
||||
|
||||
def save(self):
|
||||
@ -539,6 +539,7 @@ class StockRemoveSerializer(StockAdjustmentSerializer):
|
||||
notes=notes
|
||||
)
|
||||
|
||||
|
||||
class StockTransferSerializer(StockAdjustmentSerializer):
|
||||
"""
|
||||
Serializer for transferring (moving) stock item(s)
|
||||
@ -588,5 +589,5 @@ class StockTransferSerializer(StockAdjustmentSerializer):
|
||||
location,
|
||||
notes,
|
||||
request.user,
|
||||
quantity=item['quantity']
|
||||
quantity=quantity
|
||||
)
|
||||
|
@ -7,7 +7,7 @@ from __future__ import unicode_literals
|
||||
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.views.generic.edit import FormMixin
|
||||
from django.views.generic import DetailView, ListView, UpdateView
|
||||
from django.views.generic import DetailView, ListView
|
||||
from django.forms.models import model_to_dict
|
||||
from django.forms import HiddenInput
|
||||
from django.urls import reverse
|
||||
|
Loading…
Reference in New Issue
Block a user