From 96d8450fea853eb78edba37b53bf2a4bc4708bb1 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Mon, 3 Jun 2024 13:11:23 +0100 Subject: [PATCH] Import emblem when just one is found --- ynr/apps/parties/importer.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ynr/apps/parties/importer.py b/ynr/apps/parties/importer.py index 77a9980a9..fb1d5a9fd 100644 --- a/ynr/apps/parties/importer.py +++ b/ynr/apps/parties/importer.py @@ -385,6 +385,13 @@ def mark_inactive_emblems(self): emblem.active = False emblem.save() + # if the length of the emblem list is 1, + # then we should import the emblem just in case it has change + # but the id has not + if len(ec_emblem_id_list) == 1: + emblem = ECEmblem(self.model, self["PartyEmblems"][0]) + emblem.save() + def mark_inactive_descriptions(self): ec_description_list = []