Commit fe4ee593 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_wechat: No need to check if invoice exists

On certain cases, the invoice is created later on by activies.
parent 29ef4951
...@@ -12,11 +12,8 @@ payment = portal.accounting_module[trade_no] ...@@ -12,11 +12,8 @@ payment = portal.accounting_module[trade_no]
if person is None: if person is None:
if portal.portal_membership.isAnonymousUser(): if portal.portal_membership.isAnonymousUser():
invoice = payment.getCausalityValue()
if invoice is not None and invoice.getCausalityRelated(portal_type="Subscription Request"):
person = payment.getDestinationSectionValue() person = payment.getDestinationSectionValue()
return person.Person_restrictMethodAsShadowUser( return person.Person_restrictMethodAsShadowUser(
shadow_document=person, shadow_document=person,
callable_object=wrapWithShadow, callable_object=wrapWithShadow,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment