Преглед изворни кода

Bugfix on instanciation and infinit grows of translations

Yann Weber пре 9 година
родитељ
комит
cedf457ee0
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2
    2
      Lodel/utils/mlstring.py

+ 2
- 2
Lodel/utils/mlstring.py Прегледај датотеку

@@ -10,8 +10,8 @@ class MlString(object):
10 10
     ## Instanciate a new string with translation
11 11
     #
12 12
     # @param translations dict: With key = lang and value the translation
13
-    def __init__(self, translations=dict()):
14
-        self.translations = translations
13
+    def __init__(self, translations=None):
14
+        self.translations = dict() if translations is None else translations
15 15
     
16 16
     ## Return a translation
17 17
     # @param lang str: The lang

Loading…
Откажи
Сачувај