#31 API Tests
* adds creation tests with minimum data for intervention, compensation, ema and ecoaccount * fixes bug where empty geometry would not be created properly using the API * reworks key fetching from POST data, so inproperly stated keys will lead to an error for the API user, instead of silently working and use default data * adds some logical checks for deductable_surface of eco account creation using api * fixes bug that would have occured on creating compensations via api
This commit is contained in:
1 parent
07418a3ac3
commit
5a7ea0b6c2
14 files changed
+280
-46
No files matched your search
@@ -168,16 +168,16 @@ class ResponsibilityAPISerializerV1Mixin:
|
||||
if responsibility_data is None:
|
||||
return obj
|
||||
obj.responsible.registration_office = self.konova_code_from_json(
|
||||
responsibility_data.get("registration_office", None),
|
||||
responsibility_data["registration_office"],
|
||||
CODELIST_REGISTRATION_OFFICE_ID
|
||||
)
|
||||
obj.responsible.registration_file_number = responsibility_data.get("registration_file_number", None)
|
||||
obj.responsible.registration_file_number = responsibility_data["registration_file_number"]
|
||||
obj.responsible.conservation_office = self.konova_code_from_json(
|
||||
responsibility_data.get("conservation_office", None),
|
||||
responsibility_data["conservation_office"],
|
||||
CODELIST_CONSERVATION_OFFICE_ID,
|
||||
)
|
||||
obj.responsible.conservation_file_number = responsibility_data.get("conservation_file_number", None)
|
||||
obj.responsible.handler = responsibility_data.get("handler", None)
|
||||
obj.responsible.conservation_file_number = responsibility_data["conservation_file_number"]
|
||||
obj.responsible.handler = responsibility_data["handler"]
|
||||
return obj
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user