# 63 Refactoring
* refactors django User model to custom User model to provide further attributes and methods directly on the user model
This commit is contained in:
@@ -6,7 +6,7 @@ Created on: 04.12.20
|
||||
|
||||
"""
|
||||
from dal import autocomplete
|
||||
from django.contrib.auth.models import User
|
||||
from user.models import User
|
||||
from django.db import transaction
|
||||
from django.urls import reverse_lazy, reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
@@ -8,7 +8,7 @@ Created on: 16.11.21
|
||||
import shutil
|
||||
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.models import User
|
||||
from user.models import User
|
||||
from django.db import models, transaction
|
||||
from django.db.models import QuerySet, Sum
|
||||
from django.http import HttpRequest
|
||||
|
||||
@@ -7,7 +7,7 @@ Created on: 16.11.21
|
||||
"""
|
||||
import shutil
|
||||
|
||||
from django.contrib.auth.models import User
|
||||
from user.models import User
|
||||
from django.core.exceptions import ValidationError
|
||||
from django.core.validators import MinValueValidator
|
||||
from django.db import models, transaction
|
||||
|
||||
@@ -5,7 +5,7 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 01.12.20
|
||||
|
||||
"""
|
||||
from django.contrib.auth.models import User
|
||||
from user.models import User
|
||||
from django.http import HttpRequest
|
||||
from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
|
||||
@@ -58,20 +58,8 @@ class EcoAccountQualityChecker(CompensationQualityChecker):
|
||||
self._check_deductable_surface()
|
||||
self._check_responsible_data()
|
||||
self._check_legal_data()
|
||||
self._check_record_state()
|
||||
super().run_check()
|
||||
|
||||
def _check_record_state(self):
|
||||
""" Checks the data quality for recorded state
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
if self.obj.recorded is None:
|
||||
self.messages.append(
|
||||
_("Not recorded")
|
||||
)
|
||||
|
||||
def _check_legal_data(self):
|
||||
""" Checks the data quality for Legal
|
||||
|
||||
|
||||
Reference in New Issue
Block a user