Remove unnecessary migration (#4806)
parent
188130ad89
commit
dfc8fc9eba
|
@ -1,35 +0,0 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.16 on 2018-10-24 07:43
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
FEATURE_ID = 'mkdocs_theme_rtd'
|
||||
|
||||
|
||||
def forward_add_feature(apps, schema_editor):
|
||||
Feature = apps.get_model('projects', 'Feature')
|
||||
Feature.objects.create(
|
||||
feature_id=FEATURE_ID,
|
||||
# Not using ``default_true=True`` because we will do this manually in
|
||||
# the database from the Corporate site only, since this is not required
|
||||
# in the Community site
|
||||
# default_true=True,
|
||||
)
|
||||
|
||||
|
||||
def reverse_add_feature(apps, schema_editor):
|
||||
Feature = apps.get_model('projects', 'Feature')
|
||||
Feature.objects.filter(feature_id=FEATURE_ID).delete()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('projects', '0027_remove_json_with_html_feature'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forward_add_feature, reverse_add_feature),
|
||||
]
|
|
@ -229,9 +229,12 @@ class MkdocsBuilderTest(TestCase):
|
|||
def test_get_theme_name_with_feature_flag(self, checkout_path, run):
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
checkout_path.return_value = tmpdir
|
||||
Feature.objects.get(
|
||||
|
||||
feature = get(
|
||||
Feature,
|
||||
feature_id=Feature.MKDOCS_THEME_RTD,
|
||||
).projects.add(self.project)
|
||||
)
|
||||
feature.projects.add(self.project)
|
||||
|
||||
python_env = Virtualenv(
|
||||
version=self.version,
|
||||
|
|
Loading…
Reference in New Issue