@@ -608,7 +608,7 @@ def list(self, request):
608608 silents = self .get_nonsuperusers_excluded_codes ()
609609 for idx , row in enumerate (data , start = 1 ):
610610 row ["id" ] = idx
611- row ["silent_operation " ] = row ["appeal_id" ] in silents
611+ row ["public " ] = row ["appeal_id" ] not in silents
612612
613613 # numeric id filter (?id=3 or ?id=3,7)
614614 id_param = request .query_params .get ("id" )
@@ -738,13 +738,11 @@ def retrieve(self, request, *args, **kwargs):
738738 serialized_data = []
739739 ops_update_count = 0
740740 allocation_count = 1 # Dref Application is always the first allocation
741- silent = code in self .get_nonsuperusers_excluded_codes ()
741+ public = code not in self .get_nonsuperusers_excluded_codes ()
742742 a = ["First" , "Second" , "Third" , "Fourth" , "Fifth" , "Sixth" , "Seventh" , "Eighth" , "Ninth" , "Tenth" ]
743743 for instance in instances :
744744 if isinstance (instance , Dref ):
745- serializer = Dref3Serializer (
746- instance , context = {"stage" : "Application" , "allocation" : a [0 ], "silent_operation" : silent }
747- )
745+ serializer = Dref3Serializer (instance , context = {"stage" : "Application" , "allocation" : a [0 ], "public" : public })
748746 elif isinstance (instance , DrefOperationalUpdate ):
749747 ops_update_count += 1
750748 if instance .additional_allocation and len (a ) > allocation_count :
@@ -757,13 +755,13 @@ def retrieve(self, request, *args, **kwargs):
757755 context = {
758756 "stage" : "Operational Update " + str (ops_update_count ),
759757 "allocation" : allocation ,
760- "silent_operation " : silent ,
758+ "public " : public ,
761759 },
762760 )
763761 elif isinstance (instance , DrefFinalReport ):
764762 serializer = DrefFinalReport3Serializer (
765763 instance ,
766- context = {"stage" : "Final Report" , "allocation" : "No allocation" , "silent_operation " : silent },
764+ context = {"stage" : "Final Report" , "allocation" : "No allocation" , "public " : public },
767765 )
768766 else :
769767 continue
0 commit comments