Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan price returns None object. #45

Open
arpankotecha opened this issue Sep 29, 2017 · 0 comments
Open

Plan price returns None object. #45

arpankotecha opened this issue Sep 29, 2017 · 0 comments

Comments

@arpankotecha
Copy link

Hello,

I'm running python 2.7.6

I'm trying to loop through all apps and get the price for each addon associated with the app to calculate the total cost of the app. I thought the code below should work but plan.price is None:

for app in conn.apps():
        price_breakdown = []

        addon_list = app.addons()
        for addon in addon_list:
              plan = addon.plan
              price_breakdown.append((
                '{}@{}'.format(app.name, plan.name),
                plan.price.cents))

I get the following trace:

  File "/vagrant/tasks.py", line 129, in check_prices
    plan.price.cents))
AttributeError: 'NoneType' object has no attribute 'cents'

Any thoughts on how I can get the pricing info for each app addon?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant