From 37ceb59759489801eebbe863449377b760689645 Mon Sep 17 00:00:00 2001 From: Kumar McMillan Date: Wed, 18 Apr 2012 11:34:22 -0500 Subject: [PATCH] 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 --- apps/stats/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/stats/models.py b/apps/stats/models.py index d52ba705ff..954343a80a 100644 --- a/apps/stats/models.py +++ b/apps/stats/models.py @@ -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):