Can somebody give me a clue?

This code produces an extra table cell in each row.

I have a screen shot showing the extra columns, but I don't know how
to post it.

***************************************************************
Controller

      row_count = 0
        product_total_quantity = Decimal('0')
        for i, row in enumerate(rows):
            product_total_quantity +=
row.product_lots.quantity_on_hand
            if i + 1 < len(rows):
                next_row = rows[i+1]
            else:
                next_row = None
            if not next_row or row.products.id !=
next_row.products.id:
                arg = row.products.id
                details_link = A( 'Lot details',
                                 _href=URL('lot_details', args=arg)
                                )
                tbody.append(TR(
                    TD(row.products.name),
                    TD(row.products.internal_item_number),
                    TD(product_total_quantity), # EXTRA CELL comes up
here!!
                    TD(indexer.mk_links('Inventory', 'products', arg,
                                     leading_links = details_link)),
                ))
                row_count += 1
                product_total_quantity = 0
        index_table = TABLE(thead, tbody)

*************************************************************
Also,
def mk_links(application, controller, id, leading_links=None,
trailing_links=None):
    view_link=A('View',
                _href=URL(application, controller,'view', args = id),
                _class='button'
               )
    edit_link=A('Edit',
                _href=URL(application, controller,'edit', args = id),
                _class='button'
               )
    trash_link=A('Trash',
                 _href=URL(application, controller,'trash', args =
id),
                 _class='button'
                )
    links = TD(view_link,' ',
               edit_link,' ',trash_link,
               _class='row_buttons',
               _style='text-align:right'
              )
    if leading_links:
        links.insert(0, leading_links)
        pass
    if trailing_links:
        links.insert(-1, trailing_links)
        pass

    return links

Thank you,
Cliff Kachinske


Reply via email to