1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-01-29 16:45:19 +00:00

Compare commits

..

No commits in common. "43fc41949046c5fc5c718b06c3bca9b515300b15" and "ca54ae0c653f5872989b7c40dc43bad39e77cf26" have entirely different histories.

2 changed files with 3 additions and 3 deletions

View file

@ -117,7 +117,7 @@ def user_create(request):
@superuser_only
def user_update(request, pk):
user = get_object_or_404(User, pk=pk)
attributes, attributes_created = UserAttributes.objects.get_or_create(user=user)
attributes = UserAttributes.objects.get(user=user)
user_form = forms.UserForm(request.POST or None, instance=user)
attributes_form = forms.UserAttributesForm(
request.POST or None, instance=attributes

View file

@ -2,7 +2,7 @@ import os
import random
import string
from accounts.models import UserInstance, UserAttributes
from accounts.models import UserInstance
from appsettings.settings import app_settings
from django.conf import settings
from django.utils.translation import gettext_lazy as _
@ -26,7 +26,7 @@ def get_clone_free_names(size=10):
def check_user_quota(user, instance, cpu, memory, disk_size):
ua, attributes_created = UserAttributes.objects.get_or_create(user=user)
ua = user.userattributes
msg = ""
if user.is_superuser: