@@ -64,16 +64,16 @@ class Meta:
6464 #excludes = ['email', 'password', 'is_superuser']
6565 # Add it here.
6666 #authorization = DjangoAuthorization()
67- authorization = Authorization ()
68- #authentication = ApiKeyAuthentication()
67+ authorization = Authorization ()
68+ #authentication = ApiKeyAuthentication()
6969
7070
7171class ProjectResource (ModelResource ):
7272 """Resource for Project()"""
7373
7474 class Meta :
7575 queryset = Project .objects .all ()
76- authorization = Authorization ()
76+ authorization = Authorization ()
7777
7878
7979class BranchResource (ModelResource ):
@@ -83,7 +83,7 @@ class BranchResource(ModelResource):
8383
8484 class Meta :
8585 queryset = Branch .objects .all ()
86- authorization = Authorization ()
86+ authorization = Authorization ()
8787
8888
8989class RevisionResource (ModelResource ):
@@ -94,7 +94,7 @@ class RevisionResource(ModelResource):
9494
9595 class Meta :
9696 queryset = Revision .objects .all ()
97- authorization = Authorization ()
97+ authorization = Authorization ()
9898
9999
100100class ExecutableResource (ModelResource ):
@@ -104,15 +104,15 @@ class ExecutableResource(ModelResource):
104104
105105 class Meta :
106106 queryset = Executable .objects .all ()
107- authorization = Authorization ()
107+ authorization = Authorization ()
108108
109109
110110class BenchmarkResource (ModelResource ):
111111 """Resource for Benchmark()"""
112112
113113 class Meta :
114114 queryset = Benchmark .objects .all ()
115- authorization = Authorization ()
115+ authorization = Authorization ()
116116
117117
118118class EnvironmentResource (ModelResource ):
@@ -121,15 +121,15 @@ class EnvironmentResource(ModelResource):
121121 class Meta :
122122 queryset = Environment .objects .all ()
123123 resource_name = 'environment'
124- authorization = Authorization ()
124+ authorization = Authorization ()
125125
126126
127127class ResultResource (ModelResource ):
128128 """Resource for Result()"""
129129
130130 class Meta :
131131 queryset = Result .objects .all ()
132- authorization = Authorization ()
132+ authorization = Authorization ()
133133
134134
135135class ReportResource (ModelResource ):
@@ -142,7 +142,7 @@ class ReportResource(ModelResource):
142142 class Meta :
143143 queryset = Report .objects .all ()
144144 allowed_methods = ['get' ]
145- authorization = Authorization ()
145+ authorization = Authorization ()
146146
147147
148148class ResultBundle (Bundle ):
@@ -183,13 +183,13 @@ def __init__(self, obj=None, **kwargs):
183183 self .obj = obj
184184 self ._populate_by_obj ()
185185 elif obj is None :
186- self .obj = Result ()
186+ self .obj = Result ()
187187 else :
188188 raise ValueError ("obj has to be an instance of models.Result" )
189189
190190 if self .data :
191191 self ._check_data ()
192- self .__data_validated = False # not used for now
192+ self .__data_validated = False # not used for now
193193 super (ResultBundle , self ).__init__ (data = self .data , obj = self .obj )
194194
195195 def _populate_obj_by_data (self ):
@@ -213,7 +213,7 @@ def populate(key):
213213 }.get (key , (None , None ))()
214214
215215 try :
216- self .obj .value = float (self .data ['result_value' ])
216+ self .obj .value = float (self .data ['result_value' ])
217217 except ValueError , error :
218218 logging .error (
219219 "Result value: {0} cannot be converted to float. {1}" .format (
@@ -367,7 +367,7 @@ class ResultBundleResource(Resource):
367367
368368 class Meta :
369369 resource_name = 'benchmark-result'
370- authorization = Authorization ()
370+ authorization = Authorization ()
371371 allowed_methods = ['get' , 'post' , 'put' , 'delete' ]
372372
373373 def get_resource_uri (self , bundle_or_obj ):
@@ -417,7 +417,6 @@ def obj_create(self, bundle, request=None, **kwargs):
417417 def obj_update (self , bundle , request = None , ** kwargs ):
418418 return self .obj_create (bundle , request , ** kwargs )
419419
420-
421420 def post_list (self , request , ** kwargs ):
422421 """
423422 Creates a new resource/object with the provided data.
@@ -458,4 +457,3 @@ def obj_delete(self, request=None, **kwargs):
458457
459458 def rollback (self , bundles ):
460459 pass
461-
0 commit comments