diff --git a/AUTHORS b/AUTHORS index 1094a3fc7..6f04b8771 100644 --- a/AUTHORS +++ b/AUTHORS @@ -55,6 +55,7 @@ Eduardo Oliveira Egor Poderiagin Emanuele Palazzetti Fazeel Ghafoor +Febin Micheal Antony Federico Dolce Florian Demmer Frederico Vieira diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b13db2f0..abb4b8cc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * #1628 Fix inaccurate help_text on client_secret field of Application model +* #1656 Fix duplicate unique constraint for device_code on Oracle 19c ## [3.2.0] - 2025-11-13 ### Added diff --git a/oauth2_provider/migrations/0013_alter_application_authorization_grant_type_device.py b/oauth2_provider/migrations/0013_alter_application_authorization_grant_type_device.py index 99769c398..67a7f52b2 100644 --- a/oauth2_provider/migrations/0013_alter_application_authorization_grant_type_device.py +++ b/oauth2_provider/migrations/0013_alter_application_authorization_grant_type_device.py @@ -35,7 +35,6 @@ class Migration(migrations.Migration): options={ 'abstract': False, 'swappable': 'OAUTH2_PROVIDER_DEVICE_GRANT_MODEL', - 'constraints': [models.UniqueConstraint(fields=('device_code',), name='oauth2_provider_devicegrant_unique_device_code')], }, ), ] diff --git a/oauth2_provider/models.py b/oauth2_provider/models.py index 26ec6a6a1..5e9e2e628 100644 --- a/oauth2_provider/models.py +++ b/oauth2_provider/models.py @@ -658,12 +658,6 @@ class Meta(AbstractIDToken.Meta): class AbstractDeviceGrant(models.Model): class Meta: abstract = True - constraints = [ - models.UniqueConstraint( - fields=["device_code"], - name="%(app_label)s_%(class)s_unique_device_code", - ), - ] AUTHORIZED = "authorized" AUTHORIZATION_PENDING = "authorization-pending"