EcoAccount fixes
* adds deductable surface field into NewEcoAccountForm directly * removes custom manager for LegalData and ResponsibilityData
This commit is contained in:
@@ -23,26 +23,3 @@ class InterventionManager(models.Manager):
|
||||
).prefetch_related(
|
||||
"users",
|
||||
)
|
||||
|
||||
|
||||
class LegalDataManager(models.Manager):
|
||||
""" Holds default db fetch setting for this model type
|
||||
|
||||
"""
|
||||
def get_queryset(self):
|
||||
return super().get_querset().select_related(
|
||||
"process_type",
|
||||
).prefetch_related(
|
||||
"laws"
|
||||
)
|
||||
|
||||
|
||||
class ResponsibilityDataManager(models.Manager):
|
||||
""" Holds default db fetch setting for this model type
|
||||
|
||||
"""
|
||||
def get_queryset(self):
|
||||
return super().get_querset().select_related(
|
||||
"registration_office",
|
||||
"conservation_office",
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ from django.utils.translation import gettext_lazy as _
|
||||
from codelist.models import KonovaCode
|
||||
from codelist.settings import CODELIST_REGISTRATION_OFFICE_ID, CODELIST_CONSERVATION_OFFICE_ID, CODELIST_LAW_ID, \
|
||||
CODELIST_PROCESS_TYPE_ID
|
||||
from intervention.managers import InterventionManager, LegalDataManager, ResponsibilityDataManager
|
||||
from intervention.managers import InterventionManager
|
||||
from konova.models import BaseObject, Geometry, UuidModel, BaseResource, AbstractDocument, \
|
||||
generate_document_file_upload_path
|
||||
from konova.settings import DEFAULT_SRID_RLP, LANIS_LINK_TEMPLATE, LANIS_ZOOM_LUT
|
||||
@@ -56,7 +56,6 @@ class ResponsibilityData(UuidModel):
|
||||
conservation_file_number = models.CharField(max_length=1000, blank=True, null=True)
|
||||
handler = models.CharField(max_length=500, null=True, blank=True, help_text="Refers to 'Eingriffsverursacher' or 'Maßnahmenträger'")
|
||||
|
||||
objects = ResponsibilityDataManager()
|
||||
|
||||
def __str__(self):
|
||||
return "ZB: {} | ETS: {} | Handler: {}".format(
|
||||
@@ -172,8 +171,6 @@ class LegalData(UuidModel):
|
||||
|
||||
revocation = models.OneToOneField(Revocation, null=True, blank=True, help_text="Refers to 'Widerspruch am'", on_delete=models.SET_NULL)
|
||||
|
||||
objects = LegalDataManager()
|
||||
|
||||
|
||||
class Intervention(BaseObject):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user