#-hesham-elhattab_api

1 messages ยท Page 1 of 1 (latest)

copper ridgeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1351890001591537704

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

young juniper
#

What's the acct_xxx ID? We don't log JSON responses for GET requests

dapper dagger
#

acct_1EW7RNKFEr3VPR4E

young juniper
#

That's the ID of the Account created in the request you shared (req_Tzvn6hooX2eFXE)?

dapper dagger
#

I am fetching the account info using the account ID, yes, this is the req_Tzvn6hooX2eFXE

young juniper
#

Ah, thought it was a POST. OK, checking

#

Hmm, can you paste the JSON response from the request here and omit any PII?

dapper dagger
#

sure, give me a moment

young juniper
#

Hmm, seems like corporation is indeed a valid but deprecated value, which explains why it is undocumented. Do you have a specific concern?

dapper dagger
#

I am using djstripe version 2.7.3 and syncing data to my database , the busniess_type filed setted by djstripe in verision 2.7.3 max_len is 10 chars, so it is failing. this error started occuring this week

#

If I upgraded to DJstripe to the latest version things should work but this would require Database migrations.

young juniper
#

Sounds like something you'll need to raise with the maintainers of djstripe. AFAICT, the business_type value on your account has not changed

dapper dagger
#

then might be some other variable,

#

If I update the account type to company will that affect other things ?

young juniper
#

It may trigger verification requirements, unclear

#

(looking at your account archive to see if this has ever changed)

#

Doesn't seem to have ever changed, so this likely implies that your codebase has changed recently?

dapper dagger
#

thanks for checking, will try investigating more, I believe nothing changed in the codebase, might be wrong.

young juniper
#

Did you update the djstripe lib maybe?

dapper dagger
#

updating the djstripe library will require to me to run migrations on the production database

#

needs planning

young juniper
#

Sorry I meant did you upgrade it recently already, which may have caused the breakage

dapper dagger
#

the newer djstripe library removed the max_len constriant

#

no I didn't update it recently

copper ridgeBOT
dapper dagger
#

the only thing I suspected was the "corporation" value as its the thing casuing the error

wispy herald
#

Hi, taking over as my teammate needs to step away. Let me catch up.

dapper dagger
#

anyway I will need to update the djstripe library for my django applicatoin, because this max_len issue is causing some of the web_hooks to fail during the past month, but I was planing to do so next month, but this week the issue for the account business_type started to happen for some reason was not happening before don't know how

wispy herald
#

Given that I see this valued from then on, I do not think that is the issue

#

If you can help me better understand what exactly is breaking, I can look further and see if we can get to the bottom of this

wispy herald
#

Are you still here?

dapper dagger
#

yes

wispy herald
#

If you can share more details, I'm happy to talk through what the issue might be

dapper dagger
#

import stripe from djstripe.models import Account account_id = "acct_1EW7RNKFEr3VPR4E" remote_account = stripe.Account.retrieve(account_id) Account.sync_from_stripe_data(remote_account)
this last line fails dj-stripe==2.7.3

#

python django

wispy herald
#

What error do you see? How does it fails? Can you add way more details?

dapper dagger
#

as I told you the max_len in the database table is set to 10

wispy herald
#

As my teammate suggested it sounds like you'll need to raise this with the maintainers of djstripe since the business_type value on your account has not changed recently