@receiver(invoice_ready, sender=StripeWebhook, \
    dispatch_uid='profiles.receivers.invoice_user')
def invoice_user(sender, customer, invoice, **kwargs):
    try:
        user_profile = UserProfile.objects.get(customer_id=customer)
        amount = int(user_profile.collaborator_count * user_profile.get_price())

        if not user_profile.trialing and 0 > amount:
            stripe.InvoiceItem.create( \
                customer=customer,
                amount=amount * 100,
                currency='usd',
                description="%s Collaborators" \
                                % user_profile.collaborator_count
            )

            upcoming_invoice_updated.send(sender=None, customer=customer)

    except UserProfile.DoesNotExist:
        pass
dataset/ETHPy150Open amccloud/django-stripe/example/profiles/receivers.py/invoice_user/swapped operands of `>`