mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Flake8 fixes.
This commit is contained in:
parent
4873e2413f
commit
99150b5a05
@ -2,7 +2,6 @@
|
||||
# All Rights Reserved.
|
||||
|
||||
# Python
|
||||
from collections import OrderedDict
|
||||
import inspect
|
||||
import logging
|
||||
import time
|
||||
@ -189,7 +188,7 @@ class GenericAPIView(generics.GenericAPIView, APIView):
|
||||
# Always remove read only fields from serializer.
|
||||
for name, field in serializer.fields.items():
|
||||
if getattr(field, 'read_only', None):
|
||||
del serializer.fields[name]
|
||||
del serializer.fields[name]
|
||||
serializer._data = self.update_raw_data(serializer.data)
|
||||
return serializer
|
||||
|
||||
|
||||
@ -1251,7 +1251,7 @@ class InventorySourceOptionsSerializer(BaseSerializer):
|
||||
source = attrs.get('source', self.instance and self.instance.source or '')
|
||||
source_script = attrs.get('source_script', self.instance and self.instance.source_script or '')
|
||||
if source == 'custom':
|
||||
if not source_script is None or source_script == '':
|
||||
if source_script is None or source_script == '':
|
||||
errors['source_script'] = 'source_script must be provided'
|
||||
else:
|
||||
try:
|
||||
|
||||
@ -577,7 +577,7 @@ class AuthTokenView(APIView):
|
||||
# Always remove read only fields from serializer.
|
||||
for name, field in serializer.fields.items():
|
||||
if getattr(field, 'read_only', None):
|
||||
del serializer.fields[name]
|
||||
del serializer.fields[name]
|
||||
serializer._data = self.update_raw_data(serializer.data)
|
||||
return serializer
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user