Skocz do zawartości

hubertsuder

Członkowie
  • Postów

    2
  • Dołączył

  • Ostatnio

Posty napisane przez hubertsuder

  1. Po wywołaniu tego kodu zwraca mi error "bad argument type for built-in operation"

     

                def remap_lines_dict(line):
                    line.update({
                        'gross_ammount': line['net'] * float(f"1.{line['tax']}")
                    })
    
                    return line
    
                lines = [remap_lines_dict(line) for line in request.data['lines']]
                print(lines)
                for line in lines:
                    textob.textLine('-------------------------------------------------------------------------------------'
                                    '-------------')
                    textob.textLine(line)

    Natomiast jak mam zakomentowany **for line in lines:** to wtedy nie wywala tego błędu.

×
×
  • Utwórz nowe...