You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After adding dj-stripe 2.9.0b0 to the project and running makemigrations, the command tries to create a migration in dj-stripe package.
To Reproduce
Add 2.9.0b0 to the project poetry add dj-stripe@2.9.0b0
This will also install stripe version 11.1.1
Run manage.py makemigrations
if in docker container the error will be something like PermissionError: [Errno 13] Permission denied: '/opt/pysetup/.venv/lib/python3.12/site-packages/djstripe/migrations/0014_alter_webhookendpoint_api_version.py'
Changing the permissions to allow the migration to be create will create the following
classMigration(migrations.Migration):
dependencies= [
('djstripe', '0013_2_9'),
]
operations= [
migrations.AlterField(
model_name='webhookendpoint',
name='api_version',
field=models.CharField(blank=True, default='2024-09-30.acacia', help_text='The API version events are rendered as for this webhook endpoint. Defaults to the configured Stripe API Version.', max_length=64),
),
]
I did not set STRIPE_API_VERSION not DEFAULT_STRIPE_API_VERSION in my apps settings.
The default was introduced in ddf4b5. Which calls STRIPE_API_VERSION code in settings.py which defaults to stripe.api_version when STRIPE_API_VERSION is not set in settings.py. Hence in my case that resulted in 2024-09-30.acacia.
Digging a bit further I can see that in this migration the version defaults to 2024-04-10. Which is contradictory to settings.py which sets the DEFAULT_STRIPE_API_VERSION to 2020-08-27
So basically to avoid this migration being created I can set STRIPE_API_VERSION = '2024-04-10' in my settings.py.
Software versions
Dj-Stripe version: 2.9.0b0
Python version: 3.12.6
Django version: 5.1.2
Stripe API version: 11.1.1
Database type and version: Postgres 15
The text was updated successfully, but these errors were encountered:
Describe the bug
After adding dj-stripe 2.9.0b0 to the project and running
makemigrations
, the command tries to create a migration indj-stripe
package.To Reproduce
2.9.0b0
to the projectpoetry add dj-stripe@2.9.0b0
stripe
version11.1.1
manage.py makemigrations
PermissionError: [Errno 13] Permission denied: '/opt/pysetup/.venv/lib/python3.12/site-packages/djstripe/migrations/0014_alter_webhookendpoint_api_version.py'
Changing the permissions to allow the migration to be create will create the following
I did not set
STRIPE_API_VERSION
notDEFAULT_STRIPE_API_VERSION
in my apps settings.The
default
was introduced in ddf4b5. Which calls STRIPE_API_VERSION code insettings.py
which defaults tostripe.api_version
whenSTRIPE_API_VERSION
is not set insettings.py
. Hence in my case that resulted in2024-09-30.acacia
.Digging a bit further I can see that in this migration the version defaults to
2024-04-10
. Which is contradictory tosettings.py
which sets theDEFAULT_STRIPE_API_VERSION
to2020-08-27
So basically to avoid this migration being created I can set
STRIPE_API_VERSION = '2024-04-10'
in mysettings.py
.Software versions
The text was updated successfully, but these errors were encountered: