From b7a5c10ce4bec1a4c9881804a497a23aa637df02 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Thu, 31 May 2018 10:19:43 -0400 Subject: [PATCH] make our oauth model creation a dependency of other app --- .../0025_v330_add_oauth_activity_stream_registrar.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/awx/main/migrations/0025_v330_add_oauth_activity_stream_registrar.py b/awx/main/migrations/0025_v330_add_oauth_activity_stream_registrar.py index e7d2ef49b9..993dcc2d33 100644 --- a/awx/main/migrations/0025_v330_add_oauth_activity_stream_registrar.py +++ b/awx/main/migrations/0025_v330_add_oauth_activity_stream_registrar.py @@ -13,6 +13,12 @@ class Migration(migrations.Migration): dependencies = [ ('main', '0024_v330_create_user_session_membership'), ] + run_before = [ + # As of this migration, OAuth2Application and OAuth2AccessToken are models in main app + # Grant and RefreshToken models are still in the oauth2_provider app and reference + # the app and token models, so these must be created before the oauth2_provider models + ('oauth2_provider', '0001_initial') + ] operations = [