Bug 32030: Fix removal of agreement's vendor

It was not possible to select the blank value and submit the form

Signed-off-by: Jonathan Field <jonathan.field@ptfs-europe.com>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Jonathan Druart 2022-07-14 09:18:42 +02:00 committed by Tomas Cohen Arazi
parent 67c3fba7aa
commit 00daa3b0ea
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -296,6 +296,10 @@ export default {
delete agreement.agreement_id
agreement.is_perpetual = agreement.is_perpetual ? true : false
if (agreement.vendor_id == "") {
agreement.vendor_id = null
}
agreement.periods.forEach(p => {
p.started_on = $date_to_rfc3339(p.started_on)
p.ended_on = p.ended_on ? $date_to_rfc3339(p.ended_on) : null