diff --git a/hub/management/commands/base_importers.py b/hub/management/commands/base_importers.py index 97cbce28a..1107afc7f 100644 --- a/hub/management/commands/base_importers.py +++ b/hub/management/commands/base_importers.py @@ -31,6 +31,7 @@ "Sinn Féin": "#326760", "Social Democratic and Labour Party": "#2AA82C", "Reclaim": "#101122", + "Reform UK": "#3DBBE2", "No overall control": "#EEE", "Independents": "#DCDCDC", } diff --git a/hub/management/commands/import_mps.py b/hub/management/commands/import_mps.py index 1fa7b3d73..08488b8ae 100644 --- a/hub/management/commands/import_mps.py +++ b/hub/management/commands/import_mps.py @@ -282,12 +282,13 @@ def import_mps(self): data=mp["Party"], ) - dataset = DataSet.objects.filter(name="party", options=list()) + dataset = DataSet.objects.filter(name="party") if dataset: parties = list() all_parties = list( PersonData.objects.filter( - data_type__data_set__name="party" + person__personarea__person_type="MP", + data_type__data_set__name="party", ).values_list("data") )