Skip to content
Snippets Groups Projects
Verified Commit 0d96e75e authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Do not silent import errors

parent 6aab6369
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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"]:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment