From 6c40a1c20aecdd826760bc5ab87c20dc2ea9f40b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Aug 2016 13:44:22 +0200 Subject: Manage operation relation types in context record and find searches (refs #2799) --- archaeological_operations/tests.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'archaeological_operations/tests.py') diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index a7ca114f0..2bf3a6691 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -467,11 +467,10 @@ class OperationInitTest(object): return self.towns def get_default_town(self): - town = getattr(self, 'towns', None) - if not town: + towns = getattr(self, 'towns', None) + if not towns: self.create_towns() - town = self.towns[0] - return town + return self.towns[0] def create_parcel(self, data={}): default = {'town': self.get_default_town(), -- cgit v1.2.3