Refactoring

* splits compensation/models.py into subpackage
* renames base objects by adding suffix Mixin
This commit is contained in:
2021-11-16 08:29:18 +01:00
parent 65f02c5111
commit 6dd13179b5
11 changed files with 751 additions and 684 deletions

View File

@@ -5,6 +5,8 @@ Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 15.11.21
"""
import shutil
from django.contrib.auth.models import User
from django.db import models, transaction
from django.db.models import QuerySet
@@ -15,13 +17,13 @@ from intervention.models.legal import Legal
from intervention.models.responsibility import Responsibility
from intervention.models.revocation import RevocationDocument
from intervention.utils.quality import InterventionQualityChecker
from konova.models import generate_document_file_upload_path, AbstractDocument, Geometry, BaseObject, ShareableObject, \
RecordableObject, CheckableObject
from konova.models import generate_document_file_upload_path, AbstractDocument, Geometry, BaseObject, ShareableObjectMixin, \
RecordableObjectMixin, CheckableObjectMixin
from konova.settings import LANIS_LINK_TEMPLATE, LANIS_ZOOM_LUT, DEFAULT_SRID_RLP
from user.models import UserAction, UserActionLogEntry
class Intervention(BaseObject, ShareableObject, RecordableObject, CheckableObject):
class Intervention(BaseObject, ShareableObjectMixin, RecordableObjectMixin, CheckableObjectMixin):
"""
Interventions are e.g. construction sites where nature used to be.
"""
@@ -251,7 +253,6 @@ class InterventionDocument(AbstractDocument):
if folder_path is not None:
try:
shutil.rmtree(folder_path)
pass
except FileNotFoundError:
# Folder seems to be missing already...
pass