Browse Source

Fix synch between thumbs and title

tr4ck3ur 2 years ago
parent
commit
0ea3c05f22
1 changed files with 4 additions and 4 deletions
  1. 4 4
      jm2l/models.py

+ 4 - 4
jm2l/models.py

@@ -114,8 +114,8 @@ class JM2L_Year(Base):
114 114
     @property
115 115
     def DocLinks(self):
116 116
         from .upload import MediaPath
117
-        return zip( MediaPath().get_list('presse', self.year_uid, 'Other'),
118
-                    MediaPath().get_thumb('presse', self.year_uid, 'Other')
117
+        return zip( sorted(MediaPath().get_list('presse', self.year_uid, 'Other')),
118
+                    sorted(MediaPath().get_thumb('presse', self.year_uid, 'Other'))
119 119
                 )
120 120
 
121 121
 class User(Base):
@@ -282,8 +282,8 @@ class Tiers(Base):
282 282
     @property
283 283
     def DocLinks(self):
284 284
         from .upload import MediaPath
285
-        return zip( MediaPath().get_list('tiers', self.uid, 'Other'),
286
-                    MediaPath().get_thumb('tiers', self.uid, 'Other')
285
+        return zip( sorted( MediaPath().get_list('tiers', self.uid, 'Other') ),
286
+                    sorted( MediaPath().get_thumb('tiers', self.uid, 'Other') )
287 287
                 )
288 288
 
289 289
     @property