~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/browser/lazrjs.py

  • Committer: Ian Booth
  • Date: 2011-07-27 05:05:46 UTC
  • mto: This revision was merged to the branch mainline in revision 13532.
  • Revision ID: ian.booth@canonical.com-20110727050546-1y2m0vl74i0ul8dl
Fix failing tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
288
288
 
289
289
        Default implementation is to return the 'name' attribute.
290
290
        """
 
291
        if self.context is None:
 
292
            return None
291
293
        val = getattr(self.context, self.exported_field.__name__)
292
294
        if val is not None and safe_hasattr(val, 'name'):
293
295
            return getattr(val, 'name')