Ignore empty responsible pb on import
This commit is contained in:
parent
4688e3527d
commit
fdcba9ab4e
1 changed files with 2 additions and 0 deletions
|
|
@ -57,6 +57,8 @@ class PlanImporter(object):
|
||||||
plan.reference = ", ".join(re.split(r"\s*[,/]\s*", reference))
|
plan.reference = ", ".join(re.split(r"\s*[,/]\s*", reference))
|
||||||
|
|
||||||
def handle_responsible_publicbody(self, plan, pb):
|
def handle_responsible_publicbody(self, plan, pb):
|
||||||
|
if not pb.strip():
|
||||||
|
return
|
||||||
pb = PublicBody.objects.get(
|
pb = PublicBody.objects.get(
|
||||||
jurisdiction=self.government.jurisdiction,
|
jurisdiction=self.government.jurisdiction,
|
||||||
other_names__iregex=r"(\W|^){}(\W|$)".format(pb),
|
other_names__iregex=r"(\W|^){}(\W|$)".format(pb),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue