Ignore:
Timestamp:
20 Feb 2007, 22:17:41 (18 years ago)
Author:
joachim
Message:

fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py

    r1450 r1451  
    121121    psm = "Bed %s reserved for %s %s" % (bid,sid,student.name)
    122122elif release:
     123    modify = False
    123124    if acco_id in student_obj.objectIds():
    124125        acco_doc = getattr(student_obj, acco_id).getContent()
    125126        if acco_doc.bed != bid:
    126             acco_cat.modifyRecord(bed=bid,student='')
    127     logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
    128     psm = "%s removed from %s" % (student.name,bid)
     127            modify = True
     128    else:
     129        modify = True
     130    if modify:
     131        acco_cat.modifyRecord(bed=bid,student='')
     132        logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
     133        psm = "%s removed from %s" % (student.name,bid)
     134    else:
     135        psm = "%s removing failed for %s" % (student.name,bid)
     136       
    129137mode = 'view'
    130138return context.book_reserved_bed_form(rendered = "",
Note: See TracChangeset for help on using the changeset viewer.