API Key not defaulting to database key, when using _api_create
rbiersbach opened this issue · comments
Hey guys,
Is there a specific reason for not defaulting to the API Key in the database, when using the _api_create
method?
In all other similar methods, it is done 🤔
dj-stripe/djstripe/models/base.py
Line 212 in 74b3d20
@rbiersbach because it is a classmethod. We do not have access to the default key on the stripe object as it does not exist yet. I hope this answers your question.
@rbiersbach because it is a classmethod. We do not have access to the default key on the stripe object as it does not exist yet. I hope this answers your question.
Thanks for your quick answer. I came here because I was trying to migrate to only using API keys from the database, but I found this use case to be quite inconvenient. Maybe you should rethink the system check djstripe.I002
, as it suggests this is the new way of using secrets.
@rbiersbach That's a great point and something we are addressing in 3.0
!