@@ -1071,7 +1071,7 @@ def form_valid(self, form):
10711071class SubmissionList (RolePermsViewMixin , ItemListView ):
10721072 model = models .Submission
10731073 template_name = "item-list.html"
1074- list_columns = ['title' , 'code' , 'proposal__spokesperson__last_name ' , 'cycle' , 'kind' , 'facilities' , 'state' ]
1074+ list_columns = ['title' , 'code' , 'spokesperson ' , 'cycle' , 'kind' , 'facilities' , 'state' ]
10751075 list_filters = ['created' , 'state' , 'track' , 'kind' , 'cycle' ]
10761076 list_search = ['proposal__title' , 'proposal__id' , 'proposal__spokesperson__last_name' , 'proposal__keywords' ]
10771077 link_url = "submission-detail"
@@ -1092,13 +1092,19 @@ def get_queryset(self, *args, **kwargs):
10921092class BeamlineSubmissionList (RolePermsViewMixin , ItemListView ):
10931093 model = models .Submission
10941094 template_name = "item-list.html"
1095- list_columns = ['code' , 'title' , 'proposal__spokesperson__last_name ' , 'cycle' , 'kind' , 'facilities' , 'state' ]
1095+ list_columns = ['code' , 'title' , 'spokesperson ' , 'cycle' , 'kind' , 'facilities' , 'state' ]
10961096 list_filters = ['created' , 'state' , 'track' , 'kind' , 'cycle' ]
10971097 list_search = ['proposal__title' , 'proposal__id' , 'proposal__spokesperson__last_name' , 'proposal__keywords' ]
10981098 link_url = "submission-detail"
10991099 order_by = ['-cycle_id' ]
11001100 list_title = 'Proposal Submissions'
1101- list_transforms = {'facilities' : _fmt_beamlines , 'title' : utils .truncated_title }
1101+ list_transforms = {
1102+ 'facilities' : _fmt_beamlines ,
1103+ 'title' : utils .truncated_title ,
1104+ 'proposal__spokesperson' : utils .user_format
1105+
1106+ }
1107+
11021108 list_styles = {'title' : 'col-xs-2' }
11031109 admin_roles = USO_ADMIN_ROLES
11041110 allowed_roles = USO_ADMIN_ROLES
@@ -1113,7 +1119,9 @@ def check_allowed(self):
11131119 return allowed
11141120
11151121 def get_queryset (self , * args , ** kwargs ):
1116- self .queryset = models .Submission .objects .filter (techniques__config__facility = self .kwargs ['pk' ])
1122+ self .queryset = models .Submission .objects .filter (
1123+ techniques__config__facility = self .kwargs ['pk' ]
1124+ ).order_by ().distinct ()
11171125 return super ().get_queryset (* args , ** kwargs )
11181126
11191127
0 commit comments