File tree 2 files changed +7
-5
lines changed
django/thunderstore/social/api/experimental/views
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -269,11 +269,12 @@ const SubmissionForm: React.FC<SubmissionFormProps> = observer((props) => {
269
269
270
270
promise . then ( ( result ) => {
271
271
const next = current . concat ( result . results ) ;
272
- next . sort ( ( a , b ) =>
273
- a . identifier == props . currentCommunity . identifier
274
- ? - 1
275
- : a . name . localeCompare ( b . name )
276
- ) ;
272
+ next . sort ( ( a , b ) => {
273
+ if ( a . identifier == props . currentCommunity . identifier )
274
+ return - 1 ;
275
+ if ( b . identifier == props . currentCommunity . identifier ) return 1 ;
276
+ return a . name . localeCompare ( b . name ) ;
277
+ } ) ;
277
278
setCommunities ( next ) ;
278
279
if ( result . pagination . next_link ) {
279
280
enumerateCommunities ( next , result . pagination . next_link ) ;
Original file line number Diff line number Diff line change @@ -202,6 +202,7 @@ def get_teams(user: UserType) -> List[UserTeam]:
202
202
)
203
203
.exclude (team__is_active = False )
204
204
.exclude (~ Q (user = user ))
205
+ .order_by ("id" )
205
206
)
206
207
207
208
return [
You can’t perform that action at this time.
0 commit comments