Просмотр исходного кода

BugFix Import access_data

master
Dirk Alders 4 лет назад
Родитель
Сommit
8420686223
1 измененных файлов: 3 добавлений и 3 удалений
  1. 3
    3
      management/commands/import_userdata.py

+ 3
- 3
management/commands/import_userdata.py Просмотреть файл

56
                                     cnt_all_datasets += 1
56
                                     cnt_all_datasets += 1
57
                                     try:
57
                                     try:
58
                                         item = Item.objects.get(rel_path=rel_path)
58
                                         item = Item.objects.get(rel_path=rel_path)
59
-                                    except User.DoesNotExist:
59
+                                    except Item.DoesNotExist:
60
                                         cnt_item_missing += 1
60
                                         cnt_item_missing += 1
61
                                     else:
61
                                     else:
62
                                         if item.public_access:
62
                                         if item.public_access:
80
                                     else:
80
                                     else:
81
                                         try:
81
                                         try:
82
                                             item = Item.objects.get(rel_path=rel_path)
82
                                             item = Item.objects.get(rel_path=rel_path)
83
-                                        except User.DoesNotExist:
83
+                                        except Item.DoesNotExist:
84
                                             cnt_item_missing += 1
84
                                             cnt_item_missing += 1
85
                                         else:
85
                                         else:
86
                                             if user in item.read_access.all():
86
                                             if user in item.read_access.all():
99
                                     else:
99
                                     else:
100
                                         try:
100
                                         try:
101
                                             item = Item.objects.get(rel_path=rel_path)
101
                                             item = Item.objects.get(rel_path=rel_path)
102
-                                        except User.DoesNotExist:
102
+                                        except Item.DoesNotExist:
103
                                             cnt_item_missing += 1
103
                                             cnt_item_missing += 1
104
                                         else:
104
                                         else:
105
                                             if user in item.modify_access.all():
105
                                             if user in item.modify_access.all():

Загрузка…
Отмена
Сохранить