Z-axis geometry upload fix

* adds clamping of 3D geometries to 2D geometries if uploaded using the map importer
* extends tests for payment-document linkage
* fixes bug in team-admin selection where autocomplete could not be resolved properly
This commit is contained in:
2022-11-17 13:01:40 +01:00
parent 814f35c426
commit b0f9ee4ac0
4 changed files with 48 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ from django.core.exceptions import ObjectDoesNotExist
from django.urls import reverse
from compensation.models import Payment, EcoAccountDeduction
from intervention.models import Intervention
from intervention.models import Intervention, InterventionDocument
from konova.settings import ETS_GROUP, ZB_GROUP
from konova.tests.test_views import BaseWorkflowTestCase
from user.models import UserActionLogEntry, UserAction
@@ -153,13 +153,16 @@ class InterventionWorkflowTestCase(BaseWorkflowTestCase):
payment = Payment.objects.create(amount=10.00, due_on=None, comment="No due date because test")
self.intervention.payments.add(payment)
# Since there is a payment, we need to add a dummy document (mocking a legal document for payment info)
document = self.create_dummy_document(InterventionDocument, self.intervention)
# Run request again
self.client_user.post(check_url, post_data)
# Update intervention from db
self.intervention.refresh_from_db()
# We expect the intervention to be checked now and contains the proper data
# We expect the intervention to be checked now and contain the proper data
# Attention: We check the timestamp only on the date, not the time, since the microseconds delay would result
# in an unwanted assertion error
checked = self.intervention.checked
@@ -209,6 +212,9 @@ class InterventionWorkflowTestCase(BaseWorkflowTestCase):
payment = Payment.objects.create(amount=10.00, due_on=None, comment="No due date because test")
self.intervention.payments.add(payment)
# Since there is a payment, we need to add a dummy document (mocking a legal document for payment info)
document = self.create_dummy_document(InterventionDocument, self.intervention)
# Run request again
self.client_user.post(record_url, post_data)