mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
More pep8 goodness
This commit is contained in:
@@ -62,8 +62,9 @@ class ModelAccessPermission(permissions.BasePermission):
|
||||
|
||||
def check_put_permissions(self, request, view, obj=None):
|
||||
if not obj:
|
||||
return True # FIXME: For some reason this needs to return True
|
||||
# because it is first called with obj=None?
|
||||
# FIXME: For some reason this needs to return True
|
||||
# because it is first called with obj=None?
|
||||
return True
|
||||
if getattr(view, 'is_variable_data', False):
|
||||
return check_user_access(request.user, view.model, 'change', obj,
|
||||
dict(variables=request.DATA))
|
||||
@@ -76,8 +77,10 @@ class ModelAccessPermission(permissions.BasePermission):
|
||||
|
||||
def check_delete_permissions(self, request, view, obj=None):
|
||||
if not obj:
|
||||
return True # FIXME: For some reason this needs to return True
|
||||
# because it is first called with obj=None?
|
||||
# FIXME: For some reason this needs to return True
|
||||
# because it is first called with obj=None?
|
||||
return True
|
||||
|
||||
return check_user_access(request.user, view.model, 'delete', obj)
|
||||
|
||||
def check_permissions(self, request, view, obj=None):
|
||||
|
||||
@@ -1592,7 +1592,7 @@ class ScheduleSerializer(BaseSerializer):
|
||||
raise serializers.ValidationError('RRULE require in rrule')
|
||||
if len(match_multiple_rrule) > 1:
|
||||
raise serializers.ValidationError('Multiple RRULE is not supported')
|
||||
if not 'interval' in rrule_value.lower():
|
||||
if 'interval' not in rrule_value.lower():
|
||||
raise serializers.ValidationError('INTERVAL required in rrule')
|
||||
if 'tzid' in rrule_value.lower():
|
||||
raise serializers.ValidationError('TZID is not supported')
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Copyright (c) 2014 AnsibleWorks, Inc.
|
||||
# All Rights Reserved.
|
||||
|
||||
# noqa
|
||||
|
||||
from django.conf.urls import include, patterns, url as original_url
|
||||
|
||||
def url(regex, view, kwargs=None, name=None, prefix=''):
|
||||
|
||||
Reference in New Issue
Block a user