diff options
| -rw-r--r-- | archaeological_operations/models.py | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 2c018ce20..4de3a78e5 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -1508,13 +1508,13 @@ class Operation(          profile = get_current_profile()          ref = ""          if self.code_patriarche: -            ref = profile.operation_prefix + str(self.code_patriarche) +            ref = (profile.operation_prefix or "") + str(self.code_patriarche)              if not full:                  return ref          if self.year and self.operation_code:              if ref:                  ref += " - " -            ref += profile.default_operation_prefix +            ref += profile.default_operation_prefix or ""              ref += "-".join((str(self.year), str(self.operation_code)))          return ref or "00" @@ -1684,7 +1684,7 @@ class Operation(          lbl = str(self.operation_code)          year = self.year or 0          profile = get_current_profile() -        lbl = profile.default_operation_prefix + "%d-%s%s" % ( +        lbl = (profile.default_operation_prefix or "") + "%d-%s%s" % (              year,              (3 - len(lbl)) * "0",              lbl, @@ -1696,7 +1696,7 @@ class Operation(          if not self.code_patriarche:              return ""          profile = get_current_profile() -        return profile.operation_prefix + self.code_patriarche +        return (profile.operation_prefix or "") + self.code_patriarche      def clean(self):          if not self.operation_code: | 
