refactor: remove unused utils

This commit is contained in:
Herculino Trotta
2024-10-13 16:05:05 -03:00
parent 5b0ed9bce8
commit f95ba3a550
2 changed files with 0 additions and 16 deletions

View File

@@ -1,16 +0,0 @@
from django.contrib.auth import get_user_model
from apps.users.models import UserSettings
User = get_user_model()
def ensure_user_settings(user):
"""
Check if the given user has a UserSettings model.
If not, create one.
"""
if not hasattr(user, "settings"):
UserSettings.objects.create(user=user)
return user.settings