We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b944cb7 + 60fb1a3 commit adb0363Copy full SHA for adb0363
readthedocs/integrations/migrations/0007_update-provider-data.py
@@ -0,0 +1,27 @@
1
+# -*- coding: utf-8 -*-
2
+# Generated by Django 1.11.27 on 2020-02-18 19:00
3
+from __future__ import unicode_literals
4
+
5
+from django.db import migrations
6
7
8
+def forwards_func(apps, schema_editor):
9
+ """Old models with provider_data='' are being fetched as str instead of json."""
10
+ Integration = apps.get_model('integrations', 'Integration')
11
12
+ Integration.objects.filter(
13
+ provider_data='',
14
+ ).update(
15
+ provider_data={},
16
+ )
17
18
19
+class Migration(migrations.Migration):
20
21
+ dependencies = [
22
+ ('integrations', '0006_set-default-value-provider-data'),
23
+ ]
24
25
+ operations = [
26
+ migrations.RunPython(forwards_func),
27
0 commit comments