Skip to content

Commit f1a35f7

Browse files
committed
Convert StagingApplication to a proxy model
1 parent 57eb078 commit f1a35f7

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

dandiapi/api/models/oauth.py

+4-6
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@
33
from fnmatch import fnmatch
44

55
from django.core.exceptions import ValidationError
6-
from django.db import models
7-
from oauth2_provider.models import AbstractApplication
6+
from oauth2_provider.models import Application
87

98

10-
class StagingApplication(AbstractApplication):
9+
class StagingApplication(Application):
1110
"""
1211
Custom OAuth Toolkit `Application` model to allow wildcards to be used in redirect URIs.
1312
1413
This is ONLY used in staging; the standard `oauth2_provider.models.Application` is used
1514
in production and local development.
1615
"""
1716

18-
# The default value of `skip_authorization` in `AbstractApplication` is `False`; we
19-
# override that default here for staging.
20-
skip_authorization = models.BooleanField(default=True)
17+
class Meta:
18+
proxy = True
2119

2220
def clean(self):
2321
"""

0 commit comments

Comments
 (0)