Skip to content

Don't enqueue 'create_new_service' task in new subscriptions

  • In contract line listener, check if Subscription exists or not in OC before creating new service, to avoid duplication that caused the OP API error:
Response: status=500 body=b\'{"status":"FAIL","message":"ServiceInstance with code=SE_SC_REC_MOBILE_T_150_500 is already activated."}

If its a new subcription, the contract and its service are already send to OP independently of the contract line.

  • Send 'default_code' to create_one_shot method

Avoid error

    self.subscription.applyOneShotCharge(product.default_code)
AttributeError: 'str' object has no attribute 'default_code'

And add test to check what happends if a one_shot product doesn't have a "default_code" because its not meant to be charged in OC

Edited by Gerard Funosas

Merge request reports