comparison MPIWGRoot.py @ 185:a8d5ba6729f3

bug in delete entries fixes
author dwinter
date Fri, 14 Jun 2013 15:04:35 +0200
parents a6739bb6a575
children 3ea224968f95
comparison
equal deleted inserted replaced
184:2802941bbe2d 185:a8d5ba6729f3
515 """holt die url auf eine buchseite, bekommt identifier MPIWG-Book:XXXX""" 515 """holt die url auf eine buchseite, bekommt identifier MPIWG-Book:XXXX"""
516 516
517 splitted = ident.split(":") 517 splitted = ident.split(":")
518 if len(splitted)!=2: 518 if len(splitted)!=2:
519 logging.debug("getBookLinkFromID: %s not a valid book id, should be MPIWG-Book:XXXX"%ident) 519 logging.debug("getBookLinkFromID: %s not a valid book id, should be MPIWG-Book:XXXX"%ident)
520 return 520 return ""
521 521
522 books = getattr(self,'books',None) 522 books = getattr(self,'books',None)
523 if books is None: 523 if books is None:
524 logging.debug("getBookLinkFromID: cannot find books page folder") 524 logging.debug("getBookLinkFromID: cannot find books page folder")
525 return 525 return ""
526 526
527 527
528 bookobj = getattr(books,splitted[1],None) 528 bookobj = getattr(books,splitted[1],None)
529 529
530 if bookobj is None: 530 if bookobj is None:
531 logging.debug("getBookLinkFromID: %s not a valid book id"%ident) 531 logging.debug("getBookLinkFromID: %s not a valid book id"%ident)
532 return 532 return ""
533 533
534 534
535 return "books/"+splitted[1] 535 return "books/"+splitted[1]
536 536
537 537