forked from patchew-project/patchew
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix git Results that are incorrect empty strings
Due to an error in the migration to populate Results for git, the data field was set to an empty string rather than an empty dictionary. Fix this with another migration on top. For simplicity I am using raw SQL here. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reported-by: Shubham Jain <shubhamjain7495@gmail.com>
- Loading branch information
1 parent
097c27d
commit 5fe69c8
Showing
3 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.11.13 on 2018-07-11 12:17 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('api', '0031_auto_20180520_1654'), | ||
] | ||
|
||
operations = [ | ||
# Due to an error in the migration to populate Results for git, the data | ||
# field was set to an empty string rather than an empty dictionary. This | ||
# has been fixed now in the migration, but the fix is also included as a | ||
# separate migration in case the buggy data is found in the database. | ||
migrations.RunSQL("update api_result set data = '{}' where name='git' and data = '\"\"'") | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters