Browse Source

Refactorise kwargs usage

Bastien Sevajol (Algoo) 8 years ago
parent
commit
c4b6e0f58b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      tracim/tracim/controllers/content.py

+ 3 - 2
tracim/tracim/controllers/content.py View File

579
                          NOTE: This parameter is in kwargs because prevent URL
579
                          NOTE: This parameter is in kwargs because prevent URL
580
                          changes.
580
                          changes.
581
         """
581
         """
582
+        inverted = kwargs.get('inverted')
582
         thread_id = int(thread_id)
583
         thread_id = int(thread_id)
583
         user = tmpl_context.current_user
584
         user = tmpl_context.current_user
584
         workspace = tmpl_context.workspace
585
         workspace = tmpl_context.workspace
595
 
596
 
596
         dictified_thread = Context(CTX.THREAD).toDict(thread, 'thread')
597
         dictified_thread = Context(CTX.THREAD).toDict(thread, 'thread')
597
 
598
 
598
-        if kwargs.get('inverted'):
599
+        if inverted:
599
           dictified_thread.thread.history = reversed(dictified_thread.thread.history)
600
           dictified_thread.thread.history = reversed(dictified_thread.thread.history)
600
 
601
 
601
         return DictLikeClass(
602
         return DictLikeClass(
602
             result=dictified_thread,
603
             result=dictified_thread,
603
             fake_api=fake_api,
604
             fake_api=fake_api,
604
-            inverted=kwargs.get('inverted'),
605
+            inverted=inverted,
605
         )
606
         )
606
 
607
 
607
 
608