wip
Some checks failed
CI / test (pull_request) Failing after 14s
API CI / api-tests (pull_request) Failing after 29s

This commit is contained in:
Tim Lorsbach
2026-06-11 09:36:06 +02:00
parent d0173cf2b0
commit 30dade391f
2 changed files with 8 additions and 0 deletions

View File

@ -37,6 +37,10 @@ def create_pes(request, package_uuid):
classification = pes_data.get("classificationLevel", "")
if "secret" == classification.lower():
if current_package.classification_level != Package.Classification.SECRET:
return BadRequest("Cannot create PESs for non-secret packages.")
data_pools = pes_data.get("dataPools")
if data_pools:
if s.DATA_POOL_MAPPING[current_package.data_pool.name] not in data_pools:

View File

@ -871,6 +871,10 @@ def create_package_compound(
classification = pes_data.get("classificationLevel", "")
if "secret" == classification.lower():
if p.classification_level != Package.Classification.SECRET:
return 400, {"Cannot create PESs for non-secret packages."}
data_pools = pes_data.get("dataPools")
if data_pools:
if s.DATA_POOL_MAPPING[p.data_pool.name] not in data_pools: