diff options
| -rw-r--r-- | archaeological_warehouse/tests.py | 6 | ||||
| -rw-r--r-- | ishtar_common/utils.py | 6 | 
2 files changed, 7 insertions, 5 deletions
| diff --git a/archaeological_warehouse/tests.py b/archaeological_warehouse/tests.py index cf3c1febc..f05a0e9dd 100644 --- a/archaeological_warehouse/tests.py +++ b/archaeological_warehouse/tests.py @@ -60,12 +60,8 @@ class WarehouseWizardCreationTest(WizardTest, FindInit, TestCase):                      'location': None,                      'responsible': None,                  }, -                'divisions-warehouse_creation': [ -                    { -                        'order': 42 -                    } -                ]              }, +            ignored=['divisions-warehouse_creation']          ),      ] diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 3e05ff6eb..1d44026e0 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -1032,9 +1032,11 @@ def rename_and_simplify_media_name(full_path_name, rename=True):      :return: new full path name (or old if not changed), modified      """      try: +        is_str = False          exists = os.path.exists(full_path_name)          is_file = os.path.isfile(full_path_name)      except UnicodeEncodeError: +        is_str = True          full_path_name = full_path_name.encode('utf-8')          exists = os.path.exists(full_path_name)          is_file = os.path.isfile(full_path_name) @@ -1043,6 +1045,10 @@ def rename_and_simplify_media_name(full_path_name, rename=True):      path, current_name, name = simplify_name(full_path_name,                                               check_existing=True) +    if is_str: +        full_path_name = full_path_name.decode('utf-8') +        name = name.decode('utf-8') +        path = path.decode('utf-8')      if current_name == name:          return full_path_name, False | 
