# External ID mapping deduction and KOM
* adds support for external id usage on deduction creation for both ecoaccount and intervention * adds support for external id usage on compensation's intervention reference
This commit is contained in:
@@ -88,6 +88,11 @@ class CompensationAPISerializerV1(AbstractModelAPISerializerV1, AbstractCompensa
|
||||
# Nothing to do here
|
||||
return obj
|
||||
|
||||
# Transform a potential external identifier into an internal one
|
||||
intervention_ext_id = self._get_external_identifier(intervention_id)
|
||||
if intervention_ext_id:
|
||||
intervention_id = intervention_ext_id.internal_id
|
||||
|
||||
intervention = Intervention.objects.get(
|
||||
id=intervention_id,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user