diff --git a/api/funkwhale_api/users/admin.py b/api/funkwhale_api/users/admin.py
index 2affd083669ec2aad814dfdeb09c0898f803612a..205c7c36703ebfa153dab7b2a393f4432152e162 100644
--- a/api/funkwhale_api/users/admin.py
+++ b/api/funkwhale_api/users/admin.py
@@ -27,8 +27,8 @@ class MyUserCreationForm(UserCreationForm):
     def clean_username(self):
         username = self.cleaned_data["username"]
         try:
-            User.objects.get(username=username)
-        except User.DoesNotExist:
+            models.User.objects.get(username=username)
+        except models.User.DoesNotExist:
             return username
         raise forms.ValidationError(self.error_messages["duplicate_username"])