Skip to content

Commit 3419790

Browse files
committed
clean
1 parent e2013dd commit 3419790

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

model_validation_api/views.py

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -911,40 +911,30 @@ def get(self, request, format=None, **kwargs):
911911

912912
#if model id not specifiedorresponding to this alias.
913913
if(len(id) == 0):
914-
915-
# print("after going in first loop :", time.time()-time_spent)
916-
# time_spent=time.time()
914+
917915
web_app = request.GET.getlist('web_app')
918916

919917

920918
#if the request comes from the webapp : uses collab_parameters
921919
if len(web_app) > 0 and web_app[0] == 'True' :
922920

923-
# print("after going in first if :", time.time()-time_spent)
924-
# time_spent=time.time()
921+
925922
app_id = request.GET.getlist('app_id')[0]
926-
# print("after getting app_id:", time.time()-time_spent)
927-
# time_spent=time.time()
923+
928924
collab_id = get_collab_id_from_app_id(app_id)
929-
# print("after getting collab_id :", time.time()-time_spent)
930-
# time_spent=time.time()
925+
931926
collab_params = CollabParameters.objects.get(id = app_id )
932927

933928
collab_ids = list(CollabParameters.objects.all().values_list('collab_id', flat=True).distinct())
934-
# print("after getting collab_ids_list :", time.time()-time_spent)
935-
# collab_ids = ["2180"] #######don't forget to erase it!!!!
936-
# time_spent=time.time()
929+
937930
collab_ids_new = []
938931
for collab in collab_ids:
939932
if is_authorised(request, collab):
940933
collab_ids_new.append(collab)
941-
# print("after checking permissions :", time.time()-time_spent)
942-
# time_spent=time.time()
934+
943935
all_ctx_from_collab = CollabParameters.objects.filter(collab_id__in=collab_ids_new).distinct()
944936

945-
# print("after getting all ctx :", time.time()-time_spent)
946-
# time_spent=time.time()
947-
#if one of the collab_param is empty, don't filter on it.
937+
948938
species_filter = collab_params.species.split(",")
949939
if species_filter==[u'']:
950940
species_filter = list(Param_Species.objects.all().values_list('authorized_value', flat=True))+[u'']

0 commit comments

Comments
 (0)