Selaa lähdekoodia

BugFix Import access_data

master
Dirk Alders 4 vuotta sitten
vanhempi
commit
8420686223
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      management/commands/import_userdata.py

+ 3
- 3
management/commands/import_userdata.py Näytä tiedosto

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

Loading…
Peruuta
Tallenna