From 60aae680dd9194e1f13cdee8327bc08614a804b9 Mon Sep 17 00:00:00 2001 From: Naggafin <7529169+Naggafin@users.noreply.github.com> Date: Thu, 9 Nov 2023 13:07:26 -0500 Subject: [PATCH] changed UserSerializer to utilize custom user classes (didn't work with them before) --- helpdesk/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/serializers.py b/helpdesk/serializers.py index 6474060d..1217350e 100644 --- a/helpdesk/serializers.py +++ b/helpdesk/serializers.py @@ -2,7 +2,7 @@ from .forms import TicketForm from .lib import format_time_spent, process_attachments from .models import CustomField, FollowUp, FollowUpAttachment, Ticket from .user import HelpdeskUser -from django.contrib.auth.models import User +from django.contrib.auth import get_user_model from django.contrib.humanize.templatetags import humanize from rest_framework import serializers from rest_framework.exceptions import ValidationError @@ -152,7 +152,7 @@ class UserSerializer(serializers.ModelSerializer): password = serializers.CharField(write_only=True) class Meta: - model = User + model = get_user_model() fields = ('first_name', 'last_name', 'username', 'email', 'password') def create(self, validated_data):