mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
PEP fixes
This commit is contained in:
parent
8040ad8a6a
commit
456164f1d9
@ -10,7 +10,7 @@ def str2bool(text, test=True):
|
|||||||
if test:
|
if test:
|
||||||
return str(text).lower() in ['1', 'y', 'yes', 't', 'true', 'ok', ]
|
return str(text).lower() in ['1', 'y', 'yes', 't', 'true', 'ok', ]
|
||||||
else:
|
else:
|
||||||
return str(text).lower() in ['0', 'n', 'no', 'none', 'f', 'false',]
|
return str(text).lower() in ['0', 'n', 'no', 'none', 'f', 'false', ]
|
||||||
|
|
||||||
|
|
||||||
def WrapWithQuotes(text):
|
def WrapWithQuotes(text):
|
||||||
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from rest_framework.exceptions import ValidationError
|
from rest_framework.exceptions import ValidationError
|
||||||
|
from .helpers import str2bool
|
||||||
|
|
||||||
from django.db.models.signals import pre_delete
|
from django.db.models.signals import pre_delete
|
||||||
from django.dispatch import receiver
|
from django.dispatch import receiver
|
||||||
|
Loading…
Reference in New Issue
Block a user