Handle inapp_pay not being installed (like on straight AMO)
In other words: the foreign key backwards relationship is only applied when an app appears in INSTALLED_APPS
This commit is contained in:
Родитель
a9a413195b
Коммит
37ceb59759
|
@ -188,7 +188,7 @@ class Contribution(amo.models.ModelBase):
|
|||
When a reversal (or chargeback) is received from a PayPal IPN
|
||||
for this contribution, the hook is called.
|
||||
"""
|
||||
if self.inapp_payment.count():
|
||||
if hasattr(self, 'inapp_payment') and self.inapp_payment.count():
|
||||
self.inapp_payment.get().handle_reversal()
|
||||
|
||||
def _switch_locale(self):
|
||||
|
|
Загрузка…
Ссылка в новой задаче