Do not silent import errors

environments/review-docs-funkw-78jnxn/deployments/34
Eliot Berriot 2018-09-26 19:23:15 +02:00
rodzic 6aab6369c0
commit 0d96e75eeb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
2 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -236,7 +236,8 @@ def process_upload(upload):
except UploadImportError as e:
return fail_import(upload, e.code)
except Exception:
return fail_import(upload, "unknown_error")
fail_import(upload, "unknown_error")
raise
# under some situations, we want to skip the import (
# for instance if the user already owns the files)

Wyświetl plik

@ -130,7 +130,7 @@ class Command(BaseCommand):
except models.Library.DoesNotExist:
raise CommandError("Invalid library id")
if not library.actor.is_local:
if not library.actor.get_user():
raise CommandError("Library {} is not a local library".format(library.uuid))
if options["recursive"]: