Баг фикс

main
through-your-tears 9 months ago
parent f8e33cf400
commit 0682896582

@ -3,7 +3,7 @@ from django.contrib.auth.models import Group
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from .forms import UserCreationForm, UserChangeForm
from .models import CustomUser, Profile, RefreshToken
from .models import CustomUser, Profile, RefreshToken, QRCode
class UserAdmin(BaseUserAdmin):
@ -39,4 +39,5 @@ admin.site.register(CustomUser, UserAdmin)
admin.site.unregister(Group)
admin.site.register(RefreshToken)
admin.site.register(Profile)
admin.site.register(Profile)
admin.site.register(QRCode)

@ -221,7 +221,8 @@ class ProfileListAPIView(ListAPIView):
class QRCodeRetrieveAPIView(RetrieveAPIView):
serializer_class = QRCodeSerializer
queryset = QRCodeRepository.all()
# queryset = QRCodeRepository.all()
permission_classes = [IsAuthenticated]
def get_object(self):
return QRCodeRepository.get(self.request.user)

Loading…
Cancel
Save