diff options
author | jeff <jeff> | 2010-03-08 23:07:33 +0000 |
---|---|---|
committer | jeff <jeff> | 2010-03-08 23:07:33 +0000 |
commit | 80ed7402da67253e80dcffb7686f40e9d958da91 (patch) | |
tree | ebfaa1a1079508e7619b028c6239838556a5da8f /FS/FS/part_export/prizm.pm | |
parent | 5c2a2810f7a6bd5cd3edbba3bb84dc13819585b8 (diff) |
try a delete before adding an element to prizm
Diffstat (limited to 'FS/FS/part_export/prizm.pm')
-rw-r--r-- | FS/FS/part_export/prizm.pm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm index 6a0554b..02e89c6 100644 --- a/FS/FS/part_export/prizm.pm +++ b/FS/FS/part_export/prizm.pm @@ -206,6 +206,29 @@ sub _export_insert { # } # } +# here we cope with a problem of prizm failing to insert for reason +# of duplicate mac addr, but doing so inconsistently... a race in prizm? + + $self->prizm_command( 'CustomerIfService', 'removeElementFromCustomer', + 0, + $cust_main->custnum, + 0, + $svc->mac_addr, + ); + + $err_or_som = $self->prizm_command( 'NetworkIfService', 'getPrizmElements', + [ 'MAC Address' ], + [ $svc->mac_addr ], + [ '=' ], + ); + if ( ref($err_or_som) && $err_or_som->result->[0] ) { # ignore errors + $self->prizm_command( 'NetworkIfService', 'deleteElement', + $err_or_som->result->[0], + 1, + ); + } +# end of coping + my $performance_profile = $svc->performance_profile; $performance_profile ||= $svc->cust_svc->cust_pkg->part_pkg->pkg; |