X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fprizm.pm;h=02e89c6d3bd63981f6ec08548b2304dc4c359da7;hb=41020c1a4f6dd23e726c083ddf4e1038e07bc12e;hp=6a0554b6c23a8cfba8979ab6d59ba11f18803e3a;hpb=f256ef47d91090695a8cda27671e47e938f6a998;p=freeside.git diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm index 6a0554b6c..02e89c6d3 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;