diff --git a/api/funkwhale_api/music/tasks.py b/api/funkwhale_api/music/tasks.py
index f3a57a8398192022f2923ea6643a7fb5246affa6..8d2b276e0c41b3fa93495cad4b1f7ec9b5110c23 100644
--- a/api/funkwhale_api/music/tasks.py
+++ b/api/funkwhale_api/music/tasks.py
@@ -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)
diff --git a/api/funkwhale_api/providers/audiofile/management/commands/import_files.py b/api/funkwhale_api/providers/audiofile/management/commands/import_files.py
index d4917be5e9bd82060f2d9a11f806d2683c2523c4..af5d2cee21f4cec3fc29d29e38d2e233afe0c0d4 100644
--- a/api/funkwhale_api/providers/audiofile/management/commands/import_files.py
+++ b/api/funkwhale_api/providers/audiofile/management/commands/import_files.py
@@ -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"]: