diff --git a/chellow/e/hh_parser_df2.py b/chellow/e/hh_parser_df2.py index 84b7587bf..3927d8aae 100644 --- a/chellow/e/hh_parser_df2.py +++ b/chellow/e/hh_parser_df2.py @@ -79,12 +79,13 @@ def __next__(self): raise BadRequest("Problem parsing the value: " + fields[2]) status = fields[3][-1] + mpan_core = self.core if self.core in self.mpan_map: mapping = self.mpan_map[self.core] if mapping["from"] <= start_date <= mapping["to"]: - self.core = mapping["mpan"] + mpan_core = mapping["mpan"] - if self.core is None: + if mpan_core is None: msg = f"The MPAN core {self.core} has been ignored" if len(self.messages) == 0 or self.messages[-1] != msg: self.messages.append(